Android Utililty Methods InputStream Zip

List of utility methods to do InputStream Zip

Description

The list of methods to do InputStream Zip are organized into topic(s).

Method

voidunZipTo(InputStream paramInputStream, String paramString)
un Zip To
File localFile1 = new File(paramString);
if (!localFile1.exists())
    localFile1.mkdirs();
ZipInputStream localZipInputStream = new ZipInputStream(
        paramInputStream);
while (true) {
    ZipEntry localZipEntry = localZipInputStream.getNextEntry();
    if (localZipEntry == null)
...
voidcompress(InputStream is, OutputStream os)
compress
GZIPOutputStream gos = null;
try {
    gos = new GZIPOutputStream(os);
    int count;
    byte data[] = new byte[BUFFER];
    while ((count = is.read(data, 0, BUFFER)) != -1) {
        gos.write(data, 0, count);
    gos.finish();
    gos.flush();
} catch (IOException e) {
    System.out.println(e.getMessage());
} finally {
    try {
        gos.close();
    } catch (IOException e) {
voidcompress(InputStream is, OutputStream os)
compress
GZIPOutputStream gos = null;
try {
    gos = new GZIPOutputStream(os);
    int count;
    byte data[] = new byte[BUFFER];
    while ((count = is.read(data, 0, BUFFER)) != -1) {
        gos.write(data, 0, count);
    gos.finish();
    gos.flush();
} catch (IOException e) {
    System.out.println(e.getMessage());
} finally {
    try {
        if (gos != null) {
            gos.close();
    } catch (IOException e) {
voidcompress(InputStream is, OutputStream os)
compress
GZIPOutputStream gos = new GZIPOutputStream(os);
int count;
byte data[] = new byte[BUFFERSIZE];
while ((count = is.read(data, 0, BUFFERSIZE)) != -1) {
    gos.write(data, 0, count);
gos.flush();
gos.finish();
...