public static void zip(File file) throws IOException {
        String zipFile = file.getAbsolutePath() + ZIP_EXT;

        ZipOutputStream zos = null;
        try {
            zos = createZip(zipFile);
            addToZip(zos).file(file).recursive().add();
        } finally {
            StreamUtil.close(zos);
        }
    }
public static void zip(File file) throws IOException {
        String zipFile = file.getAbsolutePath() + ZIP_EXT;

        ZipOutputStream zos = null;
        try {
            zos = createZip(zipFile);
            addToZip(zos).file(file).recursive().add();
        } finally {
            StreamUtil.close(zos);
        }
    }
public static void zip ( File file ) throws IOException { String zipFile = file . getAbsolutePath ( ) + ZIP_EXT ; ZipOutputStream zos = null ; try { zos = createZip ( zipFile ) ; addToZip ( zos ) . file ( file ) . recursive ( ) . add ( ) ; } finally { StreamUtil . close ( zos ) ; } }
Zips a file or a folder. If adding a folder, all its content will be added.
Zips a file or a folder . If adding a folder all its content will be added .