Class SevenZFileOptions
java.lang.Object
org.apache.commons.compress.archivers.sevenz.SevenZFileOptions
Collects options for reading 7z archives.
- Since:
- 1.19
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMutable builder for the immutableSevenZFileOptions. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intstatic final SevenZFileOptionsThe default options.private static final booleanprivate static final booleanprivate final intprivate final booleanprivate final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSevenZFileOptions(int maxMemoryLimitInKb, boolean useDefaultNameForUnnamedEntries, boolean tryToRecoverBrokenArchives) -
Method Summary
Modifier and TypeMethodDescriptionstatic SevenZFileOptions.Builderbuilder()Obtains a builder for SevenZFileOptions.intGets the maximum amount of memory to use for parsing the archive and during extraction.booleanWhetherSevenZFileshall try to recover from a certain type of broken archive.booleanGets whether entries without a name should get their names set to the archive's default file name.
-
Field Details
-
DEFAUL_MEMORY_LIMIT_IN_KB
private static final int DEFAUL_MEMORY_LIMIT_IN_KB- See Also:
-
DEFAULT_USE_DEFAULTNAME_FOR_UNNAMED_ENTRIES
private static final boolean DEFAULT_USE_DEFAULTNAME_FOR_UNNAMED_ENTRIES- See Also:
-
DEFAULT_TRY_TO_RECOVER_BROKEN_ARCHIVES
private static final boolean DEFAULT_TRY_TO_RECOVER_BROKEN_ARCHIVES- See Also:
-
maxMemoryLimitInKb
private final int maxMemoryLimitInKb -
useDefaultNameForUnnamedEntries
private final boolean useDefaultNameForUnnamedEntries -
tryToRecoverBrokenArchives
private final boolean tryToRecoverBrokenArchives -
DEFAULT
The default options.- no memory limit
- don't modify the name of unnamed entries
-
-
Constructor Details
-
SevenZFileOptions
private SevenZFileOptions(int maxMemoryLimitInKb, boolean useDefaultNameForUnnamedEntries, boolean tryToRecoverBrokenArchives)
-
-
Method Details
-
builder
Obtains a builder for SevenZFileOptions.- Returns:
- a builder for SevenZFileOptions.
-
getMaxMemoryLimitInKb
public int getMaxMemoryLimitInKb()Gets the maximum amount of memory to use for parsing the archive and during extraction.Not all codecs will honor this setting. Currently only lzma and lzma2 are supported.
- Returns:
- the maximum amount of memory to use for extraction
-
getUseDefaultNameForUnnamedEntries
public boolean getUseDefaultNameForUnnamedEntries()Gets whether entries without a name should get their names set to the archive's default file name.- Returns:
- whether entries without a name should get their names set to the archive's default file name
-
getTryToRecoverBrokenArchives
public boolean getTryToRecoverBrokenArchives()WhetherSevenZFileshall try to recover from a certain type of broken archive.- Returns:
- whether SevenZFile shall try to recover from a certain type of broken archive.
- Since:
- 1.21
-