List of utility methods to do Unzip ZipEntry
void | unzipFile(ZipFile archive, File targetFile, ZipEntry entry) unzip File InputStream in = null; BufferedOutputStream out = null; try { in = archive.getInputStream(entry); out = new BufferedOutputStream(new FileOutputStream(targetFile)); byte[] buffer = new byte[8192]; int read; while (-1 != (read = in.read(buffer))) { ... |
void | unzipSingleEntry(ZipInputStream zin, File toFile) Will unzip next entry from given ZipInputStream FileOutputStream out = null; try { out = new FileOutputStream(toFile); byte[] b = new byte[512]; int len = 0; while ((len = zin.read(b)) != -1) { out.write(b, 0, len); } finally { out.close(); |