public class XZCompressorInputStream extends CompressorInputStream implements InputStreamStatistics
| Constructor and Description |
|---|
XZCompressorInputStream(java.io.InputStream inputStream)
Creates a new input stream that decompresses XZ-compressed data
from the specified input stream.
|
XZCompressorInputStream(java.io.InputStream inputStream,
boolean decompressConcatenated)
Creates a new input stream that decompresses XZ-compressed data
from the specified input stream.
|
XZCompressorInputStream(java.io.InputStream inputStream,
boolean decompressConcatenated,
int memoryLimitInKb)
Creates a new input stream that decompresses XZ-compressed data
from the specified input stream.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
long |
getCompressedCount() |
static boolean |
matches(byte[] signature,
int length)
Checks if the signature matches what is expected for a .xz 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 XZCompressorInputStream(java.io.InputStream inputStream)
throws java.io.IOException
inputStream - where to read the compressed datajava.io.IOException - if the input is not in the .xz format,
the input is corrupt or truncated, the .xz
headers specify options that are not supported
by this implementation, or the underlying
inputStream throws an exceptionpublic XZCompressorInputStream(java.io.InputStream inputStream,
boolean decompressConcatenated)
throws java.io.IOException
inputStream - where to read the compressed datadecompressConcatenated - if true, decompress until the end of the
input; if false, stop after the first .xz
stream and leave the input position to point
to the next byte after the .xz streamjava.io.IOException - if the input is not in the .xz format,
the input is corrupt or truncated, the .xz
headers specify options that are not supported
by this implementation, or the underlying
inputStream throws an exceptionpublic XZCompressorInputStream(java.io.InputStream inputStream,
boolean decompressConcatenated,
int memoryLimitInKb)
throws java.io.IOException
inputStream - where to read the compressed datadecompressConcatenated - if true, decompress until the end of the
input; if false, stop after the first .xz
stream and leave the input position to point
to the next byte after the .xz streammemoryLimitInKb - memory limit used when reading blocks. If
the estimated memory limit is exceeded on read(),
a MemoryLimitException is thrown.java.io.IOException - if the input is not in the .xz format,
the input is corrupt or truncated, the .xz
headers specify options 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 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.IOExceptionpublic 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()
getCompressedCount in interface InputStreamStatisticsCopyright © 2010 - 2023 Adobe. All Rights Reserved