List of utility methods to do Unzip File
void | unzip(File zipfile, File directory) unzip ZipFile zfile = new ZipFile(zipfile); Enumeration<? extends ZipEntry> entries = zfile.entries(); while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); File file = new File(directory, entry.getName()); if (entry.isDirectory()) { file.mkdirs(); } else { ... |
void | unzip(File zipfile, File directory) unzip ZipFile zfile = new ZipFile(zipfile); Enumeration<? extends ZipEntry> entries = zfile.entries(); while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); File file = new File(directory, entry.getName()); if (entry.isDirectory()) { file.mkdirs(); } else { ... |
void | unzip(File zipFile, File outputDir) unzip InputStream input = new BufferedInputStream(new FileInputStream(zipFile)); ZipInputStream zipInput = new ZipInputStream(input); ZipEntry entry; while ((entry = zipInput.getNextEntry()) != null) { File entryFile = new File(outputDir.getPath() + File.separatorChar + entry.getName()); if (entry.isDirectory()) { entryFile.mkdirs(); } else { ... |
void | unzip(File zipFile, File outputFolder) unzip byte[] buffer = new byte[1024]; ZipInputStream zis = null; try { zis = new ZipInputStream(new FileInputStream(zipFile)); ZipEntry ze = zis.getNextEntry(); while (ze != null) { String fileName = ze.getName(); File newFile = new File(outputFolder.getAbsolutePath() + File.separator + fileName); ... |
void | unZip(File zipFile, String desdir) un Zip ZipFile zip = new ZipFile(zipFile); Enumeration<?> en = zip.entries(); ZipEntry entry = null; byte[] buffer = new byte[8192]; int length = -1; InputStream input = null; BufferedOutputStream bos = null; File file = null; ... |
void | unZip(File zipFile, String extPlace, boolean reservZipFile) un Zip ZipInputStream in = new ZipInputStream(new FileInputStream(zipFile)); ZipEntry entry = null; while ((entry = in.getNextEntry()) != null) { String entryName = entry.getName(); if (entry.isDirectory()) { File file = new File(extPlace + entryName); file.mkdirs(); } else { ... |
void | unzip(File zipFileName, File targetDir) unzip unzip(zipFileName, targetDir, new FileFilter() { public boolean accept(File file) { return true; }); |
void | unzip(File zipName, File destDir) Convenience method unzipping zipName into destDir, cleaning up destDir first. rm(destDir); destDir.mkdir(); ZipFile zipFile = new ZipFile(zipName); Enumeration<? extends ZipEntry> entries = zipFile.entries(); while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); InputStream in = zipFile.getInputStream(entry); File targetFile = new File(destDir, entry.getName()); ... |
void | unZip(File zipPath, File destPath) un Zip if (!destPath.exists()) { destPath.mkdirs(); ZipInputStream in = new ZipInputStream(new FileInputStream(zipPath)); ZipEntry entry = in.getNextEntry(); while (entry != null) { String filePath = destPath + File.separator + entry.getName(); if (!entry.isDirectory()) { ... |
List | unzip(File zippedFile) Uncompresses zipped files return unzip(zippedFile, null);
|