List of utility methods to do Zip File Create
void | generateKMZ(String inputFileName, String outputFileName) generates a kmz zip file try { BufferedInputStream origin = null; FileOutputStream dest = new FileOutputStream("outputFileName"); ZipOutputStream out = new ZipOutputStream( new BufferedOutputStream(dest)); byte data[] = new byte[BUFFER]; File f = new File(inputFileName); System.out.println("Adding: " + f.getName()); ... |
File | zipFiles(String compressName, File[] files) compress some files to a zip file File targetFile = new File(System.getProperty("java.io.tmpdir") + compressName + ".zip"); try { byte[] buf = new byte[1024]; int len; FileOutputStream fos = new FileOutputStream(targetFile); BufferedOutputStream bos = new BufferedOutputStream(fos); ZipOutputStream zos = new ZipOutputStream(bos); ... |
void | zipFile(File resFile, ZipOutputStream zipout, String rootpath) zip File rootpath = rootpath + (rootpath.trim().length() == 0 ? "" : File.separator) + resFile.getName(); rootpath = new String(rootpath.getBytes("8859_1"), "GB2312"); if (resFile.isDirectory()) { File[] fileList = resFile.listFiles(); for (File file : fileList) { zipFile(file, zipout, rootpath); ... |
void | zipFiles(Collection zip Files ZipOutputStream zipout = new ZipOutputStream( new BufferedOutputStream(new FileOutputStream(zipFile), BUFF_SIZE)); for (File resFile : resFileList) { zipFile(resFile, zipout, ""); zipout.close(); |
void | zipFiles(Collection zip Files ZipOutputStream zipout = new ZipOutputStream( new BufferedOutputStream(new FileOutputStream(zipFile), BUFF_SIZE)); for (File resFile : resFileList) { zipFile(resFile, zipout, ""); zipout.setComment(comment); zipout.close(); ... |
void | zipFiles(Collection zip Files ZipOutputStream zipout = new ZipOutputStream( new BufferedOutputStream(new FileOutputStream(zipFile), BUFF_SIZE)); for (File resFile : resFileList) { zipFile(resFile, zipout, ""); zipout.close(); |
void | zipFiles(Collection zip Files ZipOutputStream zipout = new ZipOutputStream( new BufferedOutputStream(new FileOutputStream(zipFile), BUFF_SIZE)); for (File resFile : resFileList) { zipFile(resFile, zipout, ""); zipout.close(); |
void | zipFiles(Collection zip Files if (!zipFile.exists()) { zipFile.createNewFile(); ZipOutputStream zipout = new ZipOutputStream( new BufferedOutputStream(new FileOutputStream(zipFile), BUFF_SIZE)); for (File resFile : resFileList) { zipFile(resFile, zipout, ""); ... |
void | zipFiles(Collection zip Files ZipOutputStream zipout = new ZipOutputStream( new BufferedOutputStream(new FileOutputStream(zipFile), BUFF_SIZE)); for (File resFile : resFileList) { zipFile(resFile, zipout, ""); zipout.close(); |
void | zipFiles(Collection zip Files ZipOutputStream zipout = null; try { zipout = new ZipOutputStream(new BufferedOutputStream( new FileOutputStream(zipFile), BUFF_SIZE)); for (File resFile : resFileList) { zipFile(resFile, zipout, ""); } finally { ... |