public static class SevenZFile.Builder extends AbstractStreamBuilder<SevenZFile,SevenZFile.Builder>
SevenZFile
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SevenZFile |
get()
Gets a result.
|
SevenZFile.Builder |
setDefaultName(java.lang.String defaultName)
Sets the default name.
|
SevenZFile.Builder |
setMaxMemoryLimitKb(int maxMemoryLimitKb)
Sets the maximum amount of memory in kilobytes to use for parsing the archive and during extraction.
|
SevenZFile.Builder |
setPassword(byte[] password)
Sets the password.
|
SevenZFile.Builder |
setPassword(char[] password)
Sets the password.
|
SevenZFile.Builder |
setPassword(java.lang.String password)
Sets the password.
|
SevenZFile.Builder |
setSeekableByteChannel(java.nio.channels.SeekableByteChannel seekableByteChannel)
Sets the input channel.
|
SevenZFile.Builder |
setTryToRecoverBrokenArchives(boolean tryToRecoverBrokenArchives)
Sets whether
SevenZFile will try to recover broken archives where the CRC of the file's metadata is 0. |
SevenZFile.Builder |
setUseDefaultNameForUnnamedEntries(boolean useDefaultNameForUnnamedEntries)
Sets whether entries without a name should get their names set to the archive's default file name.
|
getCharset, setBufferSize, setBufferSize, setBufferSizeChecker, setBufferSizeMax, setCharset, setCharset, setOpenOptions
setByteArray, setCharSequence, setFile, setFile, setInputStream, setOutputStream, setPath, setPath, setReader, setURI, setWriter
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asSupplier
public SevenZFile get() throws java.io.IOException
IOSupplier
java.io.IOException
- if an I/O error occurs.public SevenZFile.Builder setDefaultName(java.lang.String defaultName)
defaultName
- the default name.public SevenZFile.Builder setMaxMemoryLimitKb(int maxMemoryLimitKb)
Not all codecs honor this setting. Currently only LZMA and LZMA2 are supported.
maxMemoryLimitKb
- the max memory limit in kilobytes.public SevenZFile.Builder setPassword(byte[] password)
password
- the password.public SevenZFile.Builder setPassword(char[] password)
password
- the password.public SevenZFile.Builder setPassword(java.lang.String password)
password
- the password.public SevenZFile.Builder setSeekableByteChannel(java.nio.channels.SeekableByteChannel seekableByteChannel)
seekableByteChannel
- the input channel.public SevenZFile.Builder setTryToRecoverBrokenArchives(boolean tryToRecoverBrokenArchives)
SevenZFile
will try to recover 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 setMaxMemoryLimitKb(int)
at the same time.
tryToRecoverBrokenArchives
- whether SevenZFile
will try to recover broken archives where the CRC of the file's metadata is 0.public SevenZFile.Builder setUseDefaultNameForUnnamedEntries(boolean useDefaultNameForUnnamedEntries)
useDefaultNameForUnnamedEntries
- whether entries without a name should get their names set to the archive's default file name.Copyright © 2010 - 2024 Adobe. All Rights Reserved