question: public static void unzip ( File zippedFile , File outputDirectory ) throws IOException { Set < String > added = new HashSet < String > ( ) ; ZipInputStream inStream = null ; try { inStream = new ZipInputStream ( new FileInputStream ( zippedFile ) ) ; ZipEntry entry ; byte [ ] buffer = new byte [ 1024 ] ; while ( ( entry = inStream . getNextEntry ( ) ) != null ) { String name = entry . getName ( ) ; if ( name != null && name . length ( ) > 0 && ! added . contains ( name ) ) { File outputFile = new File ( outputDirectory , name ) ; if ( entry . isDirectory ( ) ) { outputFile . mkdirs ( ) ; } else { extractFileFromZip ( inStream , buffer , outputFile ) ; } added . add ( name ) ; } } inStream . close ( ) ; } finally { if ( inStream != null ) { inStream . close ( ) ; } } }
target:  Unzips a file to an output directory 