Here you can find the source of unzip(String zip, String path)
public static void unzip(String zip, String path) throws IOException, FileNotFoundException
//package com.java2s; /*//from w w w. j av a 2s .c om * Copyright 2010-2011, Sikuli.org * Released under the MIT License. * */ import java.io.*; import java.util.zip.*; public class Main { public static void unzip(String zip, String path) throws IOException, FileNotFoundException { final int BUF_SIZE = 2048; FileInputStream fis = new FileInputStream(zip); ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis)); ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { int count; byte data[] = new byte[BUF_SIZE]; FileOutputStream fos = new FileOutputStream(new File(path, entry.getName())); BufferedOutputStream dest = new BufferedOutputStream(fos, BUF_SIZE); while ((count = zis.read(data, 0, BUF_SIZE)) != -1) { dest.write(data, 0, count); } dest.close(); } zis.close(); } public static String getName(String filename) { File f = new File(filename); return f.getName(); } }