Class ZipFileUtil


  • public class ZipFileUtil
    extends Object
    Zip file util class
    Author:
    pvidal
    • Method Detail

      • zip

        public static void zip​(String zipFilename,
                               List<String> filenames)
                        throws IOException
        Creates/updates a zip file.
        Parameters:
        zipFilename - the name of the zip to create
        filenames - list of filename to add to the zip
        Throws:
        IOException - IO exception
      • unzip

        public static void unzip​(String zipFilename,
                                 String destDirname)
                          throws IOException
        Unzips the specified zip file to the specified destination directory. Replaces any files in the destination, if they already exist.
        Parameters:
        zipFilename - the name of the zip file to extract
        destDirname - the directory to unzip to
        Throws:
        IOException - IO exception