public static void unzipArchive(File archive,File outputDir) throws IOException {
  ZipFile zipfile=new ZipFile(archive);
  for (Enumeration<? extends ZipEntry> e=zipfile.entries(); e.hasMoreElements(); ) {
    ZipEntry entry=e.nextElement();
    unzipEntry(zipfile,entry,outputDir);
  }
}

public static void unzipArchive ( File archive , File outputDir ) throws IOException { ZipFile zipfile = new ZipFile ( archive ) ; for ( Enumeration < ? extends ZipEntry > e = zipfile . entries ( ) ; e . hasMoreElements ( ) ; ) { ZipEntry entry = e . nextElement ( ) ; unzipEntry ( zipfile , entry , outputDir ) ; } }
unzip a zip archive into a directory on the file system . thanks to piotr gabryanczyk for making this code available at http : / / piotrga . wordpress . com / 2008 / 05 / 07 / how - to - unzip - archive - in - java /
