List of utility methods to do Zip File List
void | zipFiles(String output, String sDir, String sSearch) zip Files File dir = new File(sDir).getCanonicalFile(); ; File[] files = dir.listFiles(); List<File> lst = new ArrayList<File>(); for (File f : files) { if (sSearch.equals("*")) { lst.add(f); } else if (sSearch.indexOf("*.") >= 0) { ... |
void | zipFiles(String output_dir, List zip Files FileOutputStream fos = null; ZipOutputStream zipOut = null; FileInputStream fis = null; try { fos = new FileOutputStream(output_dir); zipOut = new ZipOutputStream(new BufferedOutputStream(fos)); for (File input : files) { fis = new FileInputStream(input); ... |
void | zipFiles(String source, String target) zip Files zip(source, target); |
boolean | zipFiles(String srcFolder, String destZipFile) zip Files boolean result = false; try { zipFolder(srcFolder, destZipFile); result = true; } catch (Exception e) { System.out.println("Some Errors happned during the zip process"); } finally { return result; ... |
void | zipFiles(ZipOutputStream out, String path, File... srcFiles) zip Files path = path.replaceAll("\\*", "/"); if (!path.endsWith("/")) { path += "/"; byte[] buf = new byte[1024]; try { for (File srcFile : srcFiles) { if (srcFile.isDirectory()) { ... |
void | zipFilesTo(Vector Zips all files in "fileVector" to the zipfile "destFile". FileOutputStream ops = null; ZipOutputStream zos = null; int basedirlen = baseDir.length(); if (!baseDir.endsWith(File.separator)) basedirlen++; try { ops = new FileOutputStream(destFile); zos = new ZipOutputStream(ops); ... |