Class SevenZFileOptions
- java.lang.Object
-
- org.apache.commons.compress.archivers.sevenz.SevenZFileOptions
-
public class SevenZFileOptions extends java.lang.Object
Collects options for reading 7z archives.- Since:
- 1.19
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SevenZFileOptions.Builder
Mutable builder for the immutableSevenZFileOptions
.
-
Field Summary
Fields Modifier and Type Field Description private static int
DEFAUL_MEMORY_LIMIT_IN_KB
static SevenZFileOptions
DEFAULT
The default options.private static boolean
DEFAULT_TRY_TO_RECOVER_BROKEN_ARCHIVES
private static boolean
DEFAULT_USE_DEFAULTNAME_FOR_UNNAMED_ENTRIES
private int
maxMemoryLimitInKb
private boolean
tryToRecoverBrokenArchives
private boolean
useDefaultNameForUnnamedEntries
-
Constructor Summary
Constructors Modifier Constructor Description private
SevenZFileOptions(int maxMemoryLimitInKb, boolean useDefaultNameForUnnamedEntries, boolean tryToRecoverBrokenArchives)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SevenZFileOptions.Builder
builder()
Obtains a builder for SevenZFileOptions.int
getMaxMemoryLimitInKb()
Gets the maximum amount of memory to use for parsing the archive and during extraction.boolean
getTryToRecoverBrokenArchives()
WhetherSevenZFile
shall try to recover from a certain type of broken archive.boolean
getUseDefaultNameForUnnamedEntries()
Gets whether entries without a name should get their names set to the archive's default file name.
-
-
-
Field Detail
-
DEFAUL_MEMORY_LIMIT_IN_KB
private static final int DEFAUL_MEMORY_LIMIT_IN_KB
- See Also:
- Constant Field Values
-
DEFAULT_USE_DEFAULTNAME_FOR_UNNAMED_ENTRIES
private static final boolean DEFAULT_USE_DEFAULTNAME_FOR_UNNAMED_ENTRIES
- See Also:
- Constant Field Values
-
DEFAULT_TRY_TO_RECOVER_BROKEN_ARCHIVES
private static final boolean DEFAULT_TRY_TO_RECOVER_BROKEN_ARCHIVES
- See Also:
- Constant Field Values
-
maxMemoryLimitInKb
private final int maxMemoryLimitInKb
-
useDefaultNameForUnnamedEntries
private final boolean useDefaultNameForUnnamedEntries
-
tryToRecoverBrokenArchives
private final boolean tryToRecoverBrokenArchives
-
DEFAULT
public static final SevenZFileOptions DEFAULT
The default options.- no memory limit
- don't modify the name of unnamed entries
-
-
Method Detail
-
builder
public static SevenZFileOptions.Builder 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()
WhetherSevenZFile
shall 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
-
-