private static void unzip(final ZipFile zip, final File patchDir) throws IOException {
        final Enumeration<? extends ZipEntry> entries = zip.entries();
        while(entries.hasMoreElements()) {
            final ZipEntry entry = entries.nextElement();
            final String name = entry.getName();
            final File current = new File(patchDir, name);
            if(entry.isDirectory()) {
                continue;
            } else {
                if(! current.getParentFile().exists()) {
                    current.getParentFile().mkdirs();
                }
                try (final InputStream eis = zip.getInputStream(entry)){
                    Files.copy(eis, current.toPath());
                    //copy(eis, current);
                }
            }
        }
    }
private static void unzip ( final ZipFile zip , final File patchDir ) throws IOException { final Enumeration < ? extends ZipEntry > entries = zip . entries ( ) ; while ( entries . hasMoreElements ( ) ) { final ZipEntry entry = entries . nextElement ( ) ; final String name = entry . getName ( ) ; final File current = new File ( patchDir , name ) ; if ( entry . isDirectory ( ) ) { continue ; } else { if ( ! current . getParentFile ( ) . exists ( ) ) { current . getParentFile ( ) . mkdirs ( ) ; } try ( final InputStream eis = zip . getInputStream ( entry ) ) { Files . copy ( eis , current . toPath ( ) ) ; } } } }
unpack...

@param zip the zip
@param patchDir the patch dir
@throws IOException