Here you can find the source of unzipEntry(ZipInputStream zis, File targetFile)
private static final File unzipEntry(ZipInputStream zis, File targetFile) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.ZipInputStream; public class Main { private static final int BUFFER_SIZE = 1024 * 2; private static final File unzipEntry(ZipInputStream zis, File targetFile) throws IOException { 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);/*w ww . j av a 2s .co m*/ } return targetFile; } }