Class ZipUtils


  • public final class ZipUtils
    extends Object
    Generate a zip from a folder.
    • Method Detail

      • generateZip

        public static List<String> generateZip​(String srcFolder,
                                               String outputZip)
                                        throws IOException,
                                               URISyntaxException
        Generate a zip Due to a bug in Java 7 corrected in Java 8 http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7156873 srcFolder and outputZip can't be URL encoded if you're using java 7.
        Parameters:
        srcFolder - source folder
        outputZip - zip folder
        Returns:
        the list of files that were included in the archive.
        Throws:
        IOException - if an error occurs creating the zip archive.
        URISyntaxException - if an error occurs creating the zip archive.