public void zip ( final File zipFile ) throws IOException { File [ ] files = listFiles ( ) ; if ( files . length == 0 ) { return ; } LOG . info ( "Creating zip file " + zipFile + " from directory " + this ) ; ZipOutputStream zipOut = null ; try { zipOut = new ZipOutputStream ( new FileOutputStream ( zipFile ) ) ; for ( File file : files ) { zip ( "" , file , zipOut ) ; } } finally { IOUtils . closeQuietly ( zipOut ) ; } }
Zips all included objects into the specified file .