public static void zipFiles(Collection<File> resFileList,File zipFile) throws IOException {
  ZipOutputStream zipout=new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(zipFile),TypedValue.BUFFER_SIZE));
  for (  File resFile : resFileList) {
    if (resFile.exists()) {
      zipFile(resFile,zipout,"");
    }
  }
  zipout.close();
}

public static void zipFiles ( Collection < File > resFileList , File zipFile ) throws IOException { ZipOutputStream zipout = new ZipOutputStream ( new BufferedOutputStream ( new FileOutputStream ( zipFile ) , TypedValue . BUFFER_SIZE ) ) ; for ( File resFile : resFileList ) { if ( resFile . exists ( ) ) { zipFile ( resFile , zipout , "" ) ; } } zipout . close ( ) ; }
zip list of file
