Class ZipWriter


  • public class ZipWriter
    extends Object
    • Method Detail

      • excludeDirs

        public void excludeDirs​(String[] dirs)
        Exclude any files that are under these directories. E.g. suppose you have C:/temp/x1, C:/temp/x2 and C:/temp/x3 and the root is set to c:temp. Then to exclude the contents of the second 2 dirs you would send in a String array with "x2" and "x3"
        Parameters:
        dirs - an array of top-level directory names
      • excludeDirsAnywhere

        public void excludeDirsAnywhere​(String[] dirs)
        Exclude any files that are under these directories. In this case if the dir name matches with ANY directory anywhere in the path -- exclude it. E.g. say you don't want to copy /a/b/c/osgi-cache/*.* then simply call this method with one of the dirs equal to "osgi-cache"
        Parameters:
        dirs - an array of directory names
        Since:
        4.0
      • safeWrite

        public void safeWrite()
                       throws ZipFileException
        Does not throw an exception when there is a duplicate zip entry.
        Throws:
        ZipFileException - if an error while creating the archive
      • main

        public static void main​(String[] args)