public static class SevenZFileOptions.Builder
extends java.lang.Object
SevenZFileOptions
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SevenZFileOptions |
build()
Create the
SevenZFileOptions . |
SevenZFileOptions.Builder |
withMaxMemoryLimitInKb(int maxMemoryLimitInKb)
Sets the maximum amount of memory to use for parsing the
archive and during extraction.
|
SevenZFileOptions.Builder |
withTryToRecoverBrokenArchives(boolean tryToRecoverBrokenArchives)
Sets whether
SevenZFile will try to revover broken archives where the CRC of the file's metadata is
0. |
SevenZFileOptions.Builder |
withUseDefaultNameForUnnamedEntries(boolean useDefaultNameForUnnamedEntries)
Sets whether entries without a name should get their names
set to the archive's default file name.
|
public SevenZFileOptions.Builder withMaxMemoryLimitInKb(int maxMemoryLimitInKb)
Not all codecs will honor this setting. Currently only lzma and lzma2 are supported.
maxMemoryLimitInKb
- limit of the maximum amount of memory to usepublic SevenZFileOptions.Builder withUseDefaultNameForUnnamedEntries(boolean useDefaultNameForUnnamedEntries)
useDefaultNameForUnnamedEntries
- if true the name of
unnamed entries will be set to the archive's default namepublic SevenZFileOptions.Builder withTryToRecoverBrokenArchives(boolean tryToRecoverBrokenArchives)
SevenZFile
will try to revover broken archives where the CRC of the file's metadata is
0.
This special kind of broken archive is encountered when mutli volume archives are closed prematurely. If
you enable this option SevenZFile will trust data that looks as if it could contain metadata of an archive
and allocate big amounts of memory. It is strongly recommended to not enable this option without setting
withMaxMemoryLimitInKb(int)
at the same time.
tryToRecoverBrokenArchives
- if true SevenZFile will try to recover archives that are broken in the
specific waypublic SevenZFileOptions build()
SevenZFileOptions
.SevenZFileOptions
.Copyright © 2010 - 2023 Adobe. All Rights Reserved