Here you can find the source of unzipEntry(ZipInputStream zin, File f)
static protected void unzipEntry(ZipInputStream zin, File f) throws IOException
//package com.java2s; /*/* w w w.j av a 2 s.c o m*/ Part of the Processing project - http://processing.org Copyright (c) 2012-15 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ import java.io.*; import java.util.zip.*; public class Main { static protected void unzipEntry(ZipInputStream zin, File f) throws IOException { FileOutputStream out = new FileOutputStream(f); byte[] b = new byte[512]; int len = 0; while ((len = zin.read(b)) != -1) { out.write(b, 0, len); } out.flush(); out.close(); } }