public static void unpack(File sourceZip,final File targetDir) throws IOException {
  ZipFile zipFile=null;
  try {
    zipFile=new ZipFile(sourceZip);
    Enumeration<? extends ZipEntry> entriesEnum=zipFile.entries();
    while (entriesEnum.hasMoreElements()) {
      unpackEntry(zipFile,entriesEnum.nextElement(),targetDir);
    }
  }
  finally {
    try {
      if (zipFile != null) {
        zipFile.close();
      }
    }
 catch (    IOException e) {
    }
  }
}

public static void unpack ( File sourceZip , final File targetDir ) throws IOException { ZipFile zipFile = null ; try { zipFile = new ZipFile ( sourceZip ) ; Enumeration < ? extends ZipEntry > entriesEnum = zipFile . entries ( ) ; while ( entriesEnum . hasMoreElements ( ) ) { unpackEntry ( zipFile , entriesEnum . nextElement ( ) , targetDir ) ; } } finally { try { if ( zipFile != null ) { zipFile . close ( ) ; } } catch ( IOException e ) { } } }
unpacks a zip file to the given directory . < p > the output directory must not be a file .
