Class ZipCompressor


  • public class ZipCompressor
    extends Object
    Utility for compressing ZIP files.
    • Constructor Detail

      • ZipCompressor

        public ZipCompressor​(FileHandler fileHandler)
        Saves the file handler.
        Parameters:
        fileHandler - File handler.
    • Method Detail

      • compress

        public void compress​(String sourceDirectory,
                             String targetFile)
                      throws IOException
        Compress a directory into a ZIP file.
        Parameters:
        sourceDirectory - Source directory.
        targetFile - Target ZIP file.
        Throws:
        IOException - If any I/O exception occurs.