Here you can find the source of unzip(File zippedFile, File unpackedFile)
public static boolean unzip(File zippedFile, File unpackedFile)
//package com.java2s; import android.util.Log; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; public class Main { static final int BUFFER = 2048; public static boolean unzip(File zippedFile, File unpackedFile) { Log.d("ZipU", "staring unzip"); try {//from w w w .jav a 2s .com BufferedOutputStream dest = null; FileInputStream fis = new FileInputStream(zippedFile); ZipInputStream zis = new ZipInputStream( new BufferedInputStream(fis)); ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { System.out.println("-----------------------Extracting: " + entry); int count; byte data[] = new byte[BUFFER]; // write the files to the disk FileOutputStream fos = new FileOutputStream(unpackedFile); dest = new BufferedOutputStream(fos, BUFFER); while ((count = zis.read(data, 0, BUFFER)) != -1) { dest.write(data, 0, count); } dest.flush(); dest.close(); } zis.close(); } catch (Exception e) { e.printStackTrace(); return false; } return true; } }