Package hudson.util.io
Class ArchiverFactory
- java.lang.Object
-
- hudson.util.io.ArchiverFactory
-
- All Implemented Interfaces:
Serializable
public abstract class ArchiverFactory extends Object implements Serializable
CreatesArchiver
on top of a stream.- Since:
- 1.359
- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ArchiverFactory
TAR
Uncompressed tar format.static ArchiverFactory
TARGZ
tar+gzstatic ArchiverFactory
ZIP
Zip format.
-
Constructor Summary
Constructors Constructor Description ArchiverFactory()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Archiver
create(OutputStream out)
Creates an archiver on top of the given stream.static ArchiverFactory
createZipWithPrefix(String prefix, OpenOption... openOptions)
Zip format, with prefix and optional OpenOptions.
-
-
-
Field Detail
-
TAR
public static ArchiverFactory TAR
Uncompressed tar format.
-
TARGZ
public static ArchiverFactory TARGZ
tar+gz
-
ZIP
public static ArchiverFactory ZIP
Zip format.
-
-
Method Detail
-
create
@NonNull public abstract Archiver create(OutputStream out) throws IOException
Creates an archiver on top of the given stream.- Throws:
IOException
-
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.
-
-