Android Utililty Methods ZipInputStream Save

List of utility methods to do ZipInputStream Save

Description

The list of methods to do ZipInputStream Save are organized into topic(s).

Method

Listupzip(ZipInputStream zip, String destPath)
upzip
List fileNames = new ArrayList();
ZipEntry azipfile = null;
while ((azipfile = zip.getNextEntry()) != null) {
    String name = azipfile.getName();
    fileNames.add(name);
    if (!azipfile.isDirectory()) {
        File targetFile = new File(destPath, name);
        targetFile.getParentFile().mkdirs();
...
FileunzipEntry(ZipInputStream zis, File targetFile)
Unzip one entry
FileOutputStream fos = new FileOutputStream(targetFile);
byte[] buffer = new byte[BUFFER_SIZE];
int len = 0;
while ((len = zis.read(buffer)) != -1) {
    fos.write(buffer, 0, len);
return targetFile;
FileunzipEntry(ZipInputStream zis, File targetFile)
unzip Entry
FileOutputStream fos = new FileOutputStream(targetFile);
byte[] buffer = new byte[BUFFER_SIZE];
int len = 0;
while ((len = zis.read(buffer)) != -1) {
    fos.write(buffer, 0, len);
return targetFile;