src/main/java/org/s2n/ddt/util/FileUtils.java
public static void zipIt(String source, String zipFile, List<String> fileList) {

		byte[] buffer = new byte[1024];
		try {
			ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile));
			for (String file : fileList) {
				zos.putNextEntry(new ZipEntry(file));
				FileInputStream in = new FileInputStream(source + File.separator + file);
				int len;
				while ((len = in.read(buffer)) > 0) {
					zos.write(buffer, 0, len);
				}
				in.close();
			}
			zos.closeEntry();
			zos.close();
		} catch (IOException ex) {
			ex.printStackTrace();
			logger.error("Error in FileUtils  :" + ex + "]");
		}
	}
/**
	 * Zip it
	 * 
	 * @param zipFile
	 *            output ZIP file location
	 */
Zip it

@param zipFile
output ZIP file location
Zip it @param zipFile output ZIP file location
public static void zipIt(String source, String zipFile, List<String> fileList) {
		byte[] buffer = new byte[1024];
		try {
			ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile));
			for (String file : fileList) {
				zos.putNextEntry(new ZipEntry(file));
				FileInputStream in = new FileInputStream(source + File.separator + file);
				int len;
				while ((len = in.read(buffer)) > 0) {
					zos.write(buffer, 0, len);
				}
				in.close();
			}
			zos.closeEntry();
			zos.close();
		} catch (IOException ex) {
			ex.printStackTrace();
			logger.error("Error in FileUtils  :" + ex + "]");
		}
	}
public static void zipIt ( String source , String zipFile , List < String > fileList ) { byte [ ] buffer = new byte [ 1024 ] ; try { ZipOutputStream zos = new ZipOutputStream ( new FileOutputStream ( zipFile ) ) ; for ( String file : fileList ) { zos . putNextEntry ( new ZipEntry ( file ) ) ; FileInputStream in = new FileInputStream ( source + File . separator + file ) ; int len ; while ( ( len = in . read ( buffer ) ) > 0 ) { zos . write ( buffer , 0 , len ) ; } in . close ( ) ; } zos . closeEntry ( ) ; zos . close ( ) ; } catch ( IOException ex ) { ex . printStackTrace ( ) ; logger . error ( "Error in FileUtils  :" + ex + "]" ) ; } }
Zip it
Zip it