List of utility methods to do InputStream Unzip
List | getZipFileList(InputStream is) get the file list in the inputstream data List<String> ret = new ArrayList<String>(); try { ZipInputStream in = new ZipInputStream(is); ZipEntry entry = null; while ((entry = in.getNextEntry()) != null) { ret.add(entry.getName()); return ret; ... |
void | extZipFile(InputStream is, String extPlace) ext Zip File ZipInputStream in = new ZipInputStream(is); ZipEntry entry = null; try { while ((entry = in.getNextEntry()) != null) { final String fullName = extPlace + entry.getName(); if (entry.isDirectory()) { File file = new File(fullName); file.mkdirs(); ... |
void | decompressFile(File destFile, ZipInputStream zis) decompress File BufferedOutputStream bos = new BufferedOutputStream( new FileOutputStream(destFile)); int count; byte data[] = new byte[BUFFER]; while ((count = zis.read(data, 0, BUFFER)) != -1) { bos.write(data, 0, count); bos.close(); ... |