Class ZCompressorInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.commons.compress.compressors.CompressorInputStream
-
- org.apache.commons.compress.compressors.lzw.LZWInputStream
-
- org.apache.commons.compress.compressors.z.ZCompressorInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,InputStreamStatistics
public class ZCompressorInputStream extends LZWInputStream
Input stream that decompresses .Z files.- Since:
- 1.7
-
-
Constructor Summary
Constructors Constructor Description ZCompressorInputStream(InputStream inputStream)
ZCompressorInputStream(InputStream inputStream, int memoryLimitInKb)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
matches(byte[] signature, int length)
Checks if the signature matches what is expected for a Unix compress file.-
Methods inherited from class org.apache.commons.compress.compressors.lzw.LZWInputStream
close, getCompressedCount, read, read
-
Methods inherited from class org.apache.commons.compress.compressors.CompressorInputStream
getBytesRead, getCount, getUncompressedCount
-
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.commons.compress.utils.InputStreamStatistics
getUncompressedCount
-
-
-
-
Constructor Detail
-
ZCompressorInputStream
public ZCompressorInputStream(InputStream inputStream, int memoryLimitInKb) throws IOException
- Throws:
IOException
-
ZCompressorInputStream
public ZCompressorInputStream(InputStream inputStream) throws IOException
- Throws:
IOException
-
-
Method Detail
-
matches
public static boolean matches(byte[] signature, int length)
Checks if the signature matches what is expected for a Unix compress file.- Parameters:
signature
- the bytes to checklength
- the number of bytes to check- Returns:
- true, if this stream is a Unix compress compressed stream, false otherwise
- Since:
- 1.9
-
-