Java Utililty Methods Unzip ZipEntry

List of utility methods to do Unzip ZipEntry

Description

The list of methods to do Unzip ZipEntry are organized into topic(s).

Method

voidunzipFile(ZipFile archive, File targetFile, ZipEntry entry)
unzip File
InputStream in = null;
BufferedOutputStream out = null;
try {
    in = archive.getInputStream(entry);
    out = new BufferedOutputStream(new FileOutputStream(targetFile));
    byte[] buffer = new byte[8192];
    int read;
    while (-1 != (read = in.read(buffer))) {
...
voidunzipSingleEntry(ZipInputStream zin, File toFile)
Will unzip next entry from given ZipInputStream
FileOutputStream out = null;
try {
    out = new FileOutputStream(toFile);
    byte[] b = new byte[512];
    int len = 0;
    while ((len = zin.read(b)) != -1) {
        out.write(b, 0, len);
} finally {
    out.close();