edu.northwestern.at.utils

## Class ZipUtils

- java.lang.Object
- - edu.northwestern.at.utils.ZipUtils

-     public class ZipUtils
      extends java.lang.Object

  Zip file utilities.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ZipUtils()` Don't allow instantiation, do allow overrides.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `zipDirectoryTree(java.lang.String inputDirectory, java.lang.String outputZipFileName)` Zip files in a directory tree.
    `static void` | `zipDirectoryTree(java.lang.String inputDirectory, java.lang.String parentPath, java.io.FilenameFilter filenameFilter, java.util.zip.ZipOutputStream zipOutputStream)` Zip files in a directory tree.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ZipUtils

          protected ZipUtils()

      Don't allow instantiation, do allow overrides.

  - ### Method Detail

    - #### zipDirectoryTree

          public static void zipDirectoryTree(java.lang.String inputDirectory,
                              java.lang.String outputZipFileName)
                                       throws java.io.IOException

      Zip files in a directory tree.
      Parameters:
        `inputDirectory` - The directory at which to start zipping.
        `outputZipFileName` - The name of the output zip file.
      Throws:
        `java.io.IOException` - When something goes wrong.

        All the files in "inputDirectory" as well as its subdirectories are compressed and added to the output zip file specified by "outputZipFileName". The file names have subdirectory names prepended which are rooted at the specified input directory.

    - #### zipDirectoryTree

          public static void zipDirectoryTree(java.lang.String inputDirectory,
                              java.lang.String parentPath,
                              java.io.FilenameFilter filenameFilter,
                              java.util.zip.ZipOutputStream zipOutputStream)
                                       throws java.io.IOException

      Zip files in a directory tree.
      Parameters:
        `inputDirectory` - The directory at which to start zipping.
        `parentPath` - The parent path to the input directory.
        `filenameFilter` - FileNameFilter for filtering files to zip.
        `zipOutputStream` - ZipOutputStream to which to write files in directory tree. The stream must already be open on entry to this method.
      Throws:
        `java.io.IOException` - When something goes wrong.

        All the files in "inputDirectory" as well as its subdirectories are compressed and added to the ZipOutputStream specified by "zipOutputStream".