public static void unZipFiles ( InputStream inputStream , File outputFolder ) throws IOException { ZipInputStream zis = new ZipInputStream ( inputStream ) ; ZipEntry ze = zis . getNextEntry ( ) ; while ( ze != null ) { File file = new File ( outputFolder , ze . getName ( ) ) ; OutputStream os = new BufferedOutputStream ( FileUtils . openOutputStream ( file ) ) ; try { IOUtils . copy ( zis , os ) ; } finally { IOUtils . closeQuietly ( os ) ; } zis . closeEntry ( ) ; ze = zis . getNextEntry ( ) ; } }
Unzips a zip from an input stream into an output folder .