Class ArchiverFactory

java.lang.Object
hudson.util.io.ArchiverFactory
All Implemented Interfaces:
Serializable

public abstract class ArchiverFactory extends Object implements Serializable
Creates Archiver on top of a stream.
Since:
1.359
Author:
Kohsuke Kawaguchi
See Also:
  • Field Details

  • Constructor Details

    • ArchiverFactory

      public ArchiverFactory()
  • Method Details

    • 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:
      2.449
    • 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.