public class LZMACompressorInputStream extends CompressorInputStream implements InputStreamStatistics
| Constructor and Description |
|---|
LZMACompressorInputStream(java.io.InputStream inputStream)
Creates a new input stream that decompresses LZMA-compressed data from the specified input stream.
|
LZMACompressorInputStream(java.io.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) |
getBytesRead, getCount, getUncompressedCountequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUncompressedCountpublic LZMACompressorInputStream(java.io.InputStream inputStream)
throws java.io.IOException
inputStream - where to read the compressed datajava.io.IOException - 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(java.io.InputStream inputStream,
int memoryLimitInKb)
throws java.io.IOException
inputStream - where to read the compressed datamemoryLimitInKb - calculated memory use threshold. Throws MemoryLimitException if calculate memory use is above this thresholdjava.io.IOException - 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 java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic long getCompressedCount()
InputStreamStatisticsgetCompressedCount in interface InputStreamStatisticspublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buf,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionCopyright © 2010 - 2024 Adobe. All Rights Reserved