LOGGER.debug("Unable to unzip zip file '{}'", dependency.getFilePath(), ex); } finally { ZipFile.closeQuietly(zip);
public static List<String> listZipEntries(File zipFile) { List<String> list = new ArrayList<String>(); ZipFile zip; try { zip = new ZipFile(zipFile); Enumeration<ZipArchiveEntry> en = zip.getEntries(); ZipArchiveEntry ze = null; while (en.hasMoreElements()) { ze = en.nextElement(); String name = ze.getName(); list.add(name); } if (null != zip) ZipFile.closeQuietly(zip); } catch (IOException e) { } return list; }
ZipFile.closeQuietly(file);
fos.close(); if (null != zip) ZipFile.closeQuietly(zip); } catch (IOException e) { e.printStackTrace();
ZipFile.closeQuietly(zipFile);
ZipFile.closeQuietly(file);
private boolean validIndexZipFile(final String zipFile) { // We want a zip file with an index for ao and ofbiz data. try { final ZipFile file = new ZipFile(zipFile); try { final ZipArchiveEntry ofbizXML = file.getEntry("entities.xml"); final ZipArchiveEntry aoXML = file.getEntry("activeobjects.xml"); return ofbizXML != null && aoXML != null; } finally { ZipFile.closeQuietly(file); } } catch (IOException e) { LOG.debug("Can't access zip file '" + zipFile+ "'"); return false; } } }
ZipFile.closeQuietly(archive);
ZipFile.closeQuietly(archive);
ZipFile.closeQuietly(file);
LOGGER.debug("Unable to unzip zip file '{}'", dependency.getFilePath(), ex); } finally { ZipFile.closeQuietly(zip);
ZipFile.closeQuietly(zf);
ZipFile.closeQuietly(zipFile);