public static void zip ( File destination , File [ ] source ) throws FileNotFoundException , IOException { FileOutputStream dest = new FileOutputStream ( destination ) ; ZipOutputStream zout = new ZipOutputStream ( new BufferedOutputStream ( dest ) ) ; for ( File element : source ) { zip ( null , element , zout ) ; } zout . close ( ) ; }
Create a zip file .