Package org.eclipse.jgit.archive
Class BaseFormat
java.lang.Object
org.eclipse.jgit.archive.BaseFormat
- Direct Known Subclasses:
TarFormat
,Tbz2Format
,TgzFormat
,TxzFormat
,ZipFormat
Base format class
- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
Compression-level for the archive file. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.commons.compress.archivers.ArchiveOutputStream
applyFormatOptions
(org.apache.commons.compress.archivers.ArchiveOutputStream s, Map<String, Object> o) Apply options to archive output streamprotected int
Removes and returns theCOMPRESSION_LEVEL
key from the input map parameter if it exists, or -1 if this key does not exist.
-
Field Details
-
COMPRESSION_LEVEL
Compression-level for the archive file. Only values in [0-9] are allowed.- Since:
- 5.11
- See Also:
-
-
Constructor Details
-
BaseFormat
public BaseFormat()
-
-
Method Details
-
applyFormatOptions
protected org.apache.commons.compress.archivers.ArchiveOutputStream applyFormatOptions(org.apache.commons.compress.archivers.ArchiveOutputStream s, Map<String, Object> o) throws IOExceptionApply options to archive output stream- Parameters:
s
- stream to apply options too
- options map- Returns:
- stream with option applied
- Throws:
IOException
-
getCompressionLevel
Removes and returns theCOMPRESSION_LEVEL
key from the input map parameter if it exists, or -1 if this key does not exist.- Parameters:
o
- options map- Returns:
- The compression level if it exists in the map, or -1 instead.
- Throws:
IllegalArgumentException
- if theCOMPRESSION_LEVEL
option does not parse to an Integer.- Since:
- 5.11
-