public class LZMACompressorInputStream extends CompressorInputStream implements InputStreamStatistics
| Constructor and Description |
|---|
LZMACompressorInputStream(InputStream inputStream)
Creates a new input stream that decompresses LZMA-compressed data
from the specified input stream.
|
LZMACompressorInputStream(InputStream inputStream,
int memoryLimitInKb)
Creates a new input stream that decompresses LZMA-compressed data
from the specified input stream.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
long |
getCompressedCount()
Gets the amount of raw or compressed bytes read by the stream.
|
static boolean |
matches(byte[] signature,
int length)
Checks if the signature matches what is expected for an LZMA file.
|
int |
read() |
int |
read(byte[] buf,
int off,
int len) |
long |
skip(long n) |
count, count, getBytesRead, getCount, getUncompressedCount, pushedBackBytesmark, markSupported, read, resetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUncompressedCountpublic LZMACompressorInputStream(InputStream inputStream) throws IOException
inputStream - where to read the compressed dataIOException - if the input is not in the .lzma format,
the input is corrupt or truncated, the .lzma
headers specify sizes that are not supported
by this implementation, or the underlying
inputStream throws an exceptionpublic LZMACompressorInputStream(InputStream inputStream, int memoryLimitInKb) throws IOException
inputStream - where to read the compressed datamemoryLimitInKb - calculated memory use threshold. Throws MemoryLimitException
if calculate memory use is above this thresholdIOException - if the input is not in the .lzma format,
the input is corrupt or truncated, the .lzma
headers specify sizes that are not supported
by this implementation, or the underlying
inputStream throws an exceptionpublic static boolean matches(byte[] signature,
int length)
signature - the bytes to checklength - the number of bytes to checkpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic long getCompressedCount()
InputStreamStatisticsgetCompressedCount in interface InputStreamStatisticspublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] buf,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionCopyright © 2002–2025. All rights reserved.