Top Description Fields Constructors Methods
org.eclipse.jgit.archive

public Class BaseFormat

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.jgit.archive.TarFormat, org.eclipse.jgit.archive.Tbz2Format, org.eclipse.jgit.archive.TgzFormat, org.eclipse.jgit.archive.TxzFormat, org.eclipse.jgit.archive.ZipFormat
Imports
java.beans.Statement, java.io.IOException, java.text.MessageFormat, java.util.Map, org.apache.commons.compress.archivers.ArchiveEntry, .ArchiveOutputStream, org.eclipse.jgit.archive.internal.ArchiveText, org.eclipse.jgit.util.StringUtils

Base format class
Since
4.0

Field Summary

Modifier and TypeField and Description
protected static final String
COMPRESSION_LEVEL

Compression-level for the archive file.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected ArchiveOutputStream<? extends ArchiveEntry>

Returns:

stream with option applied
applyFormatOptions
(ArchiveOutputStream<? extends ArchiveEntry>
stream to apply options to
s
,
Map<String, Object>
options map
o
)

Apply options to archive output stream

protected int

Returns:

The compression level if it exists in the map, or -1 instead.
getCompressionLevel
(Map<String, Object>
options map
o
)

Removes and returns the COMPRESSION_LEVEL key from the input map parameter if it exists, or -1 if this key does not exist.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

COMPRESSION_LEVELback to summary
protected static final String COMPRESSION_LEVEL

Compression-level for the archive file. Only values in [0-9] are allowed.

Since
5.11

Constructor Detail

BaseFormatback to summary
public BaseFormat()

Method Detail

applyFormatOptionsback to summary
protected ArchiveOutputStream<? extends ArchiveEntry> applyFormatOptions(ArchiveOutputStream<? extends ArchiveEntry> s, Map<String, Object> o) throws IOException

Apply options to archive output stream

Parameters
s:ArchiveOutputStream<? extends ArchiveEntry>

stream to apply options to

o:Map<String, Object>

options map

Returns:ArchiveOutputStream<? extends ArchiveEntry>

stream with option applied

Exceptions
IOException:
if an IO error occurred
getCompressionLevelback to summary
protected int getCompressionLevel(Map<String, Object> o)

Removes and returns the COMPRESSION_LEVEL key from the input map parameter if it exists, or -1 if this key does not exist.

Parameters
o:Map<String, Object>

options map

Returns:int

The compression level if it exists in the map, or -1 instead.

Exceptions
IllegalArgumentException:
if the COMPRESSION_LEVEL option does not parse to an Integer.
Since
5.11