Class ArchiverFactory

    • Constructor Detail

      • ArchiverFactory

        public ArchiverFactory()
    • Method Detail

      • create

        @NonNull
        public Archiver create​(OutputStream out)
                        throws IOException
        Creates an archiver on top of the given stream. File names in the archive are encoded with default character set.
        Throws:
        IOException
      • create

        @NonNull
        public abstract Archiver create​(OutputStream out,
                                        Charset filenamesEncoding)
                                 throws IOException
        Creates an archiver on top of the given stream.
        Parameters:
        filenamesEncoding - the encoding to be used in the archive for file names
        Throws:
        IOException
        Since:
        TODO
      • createZipWithPrefix

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public static ArchiverFactory createZipWithPrefix​(String prefix,
                                                          OpenOption... openOptions)
        Zip format, with prefix and optional OpenOptions.
        Parameters:
        prefix - The portion of file path that will be added at the beginning of the relative path inside the archive. If non-empty, a trailing forward slash will be enforced.
        openOptions - the options to apply when opening files.