List of utility methods to do ZipOutputStream Write
void | zipFile(File file, ZipOutputStream zos) Adds a file to the current zip output stream zos.putNextEntry(new ZipEntry(file.getName())); BufferedInputStream bis = null; try { bis = new BufferedInputStream(new FileInputStream(file)); long bytesRead = 0; byte[] bytesIn = new byte[BUFFER_SIZE]; int read = 0; while ((read = bis.read(bytesIn)) != -1) { ... |
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 | 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 | 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 | 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 | zipFile(File resFile, ZipOutputStream zipout, String rootpath) zip File rootpath = rootpath + (rootpath.trim().length() == 0 ? "" : File.separator) + resFile.getName(); rootpath = new String(rootpath.getBytes(ENCODE_8859_1), ENCODE_GB2312); if (resFile.isDirectory()) { File[] fileList = resFile.listFiles(); for (File file : fileList) { ... |
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"), HTTP.UTF_8); BufferedInputStream in = null; try { if (resFile.isDirectory()) { File[] fileList = resFile.listFiles(); ... |
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"), HTTP.UTF_8); BufferedInputStream in = null; try { if (resFile.isDirectory()) { File[] fileList = resFile.listFiles(); ... |
void | zipFile(ZipOutputStream out, File file) zip File BufferedInputStream origin; byte data[] = new byte[BUFFER]; String str = file.getPath(); FileInputStream fi = new FileInputStream(str); origin = new BufferedInputStream(fi, BUFFER); ZipEntry entry = new ZipEntry( str.substring(str.lastIndexOf("/") + 1)); out.putNextEntry(entry); ... |
void | zipFile(ZipOutputStream out, File file) zip File BufferedInputStream origin; byte data[] = new byte[BUFFER]; String str = file.getPath(); FileInputStream fi = new FileInputStream(str); origin = new BufferedInputStream(fi, BUFFER); ZipEntry entry = new ZipEntry( str.substring(str.lastIndexOf("/") + 1)); out.putNextEntry(entry); ... |