Here you can find the source of decompressFile(File destFile, ZipInputStream zis)
private static void decompressFile(File destFile, ZipInputStream zis) throws Exception
//package com.java2s; //License from project: Open Source License import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.util.zip.ZipInputStream; public class Main { private static final int BUFFER = 1024; private static void decompressFile(File destFile, ZipInputStream zis) throws Exception { 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);//from w w w . j av a2 s .c o m } bos.close(); } }