Class CompressorInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.commons.compress.compressors.CompressorInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
AbstractLZ77CompressorInputStream,BrotliCompressorInputStream,BZip2CompressorInputStream,Deflate64CompressorInputStream,DeflateCompressorInputStream,FramedLZ4CompressorInputStream,FramedSnappyCompressorInputStream,GzipCompressorInputStream,LZMACompressorInputStream,LZWInputStream,Pack200CompressorInputStream,XZCompressorInputStream,ZstdCompressorInputStream
public abstract class CompressorInputStream extends java.io.InputStreamAbstracts services for all compressor input streams.
-
-
Constructor Summary
Constructors Constructor Description CompressorInputStream()Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longgetBytesRead()Gets the current number of bytes read from this stream.intgetCount()Deprecated.this method may yield wrong results for large archives, use #getBytesRead insteadlonggetUncompressedCount()Gets the amount of raw or compressed bytes read by the stream.
-
-
-
Method Detail
-
getBytesRead
public long getBytesRead()
Gets the current number of bytes read from this stream.- Returns:
- the number of read bytes
- Since:
- 1.1
-
getCount
@Deprecated public int getCount()
Deprecated.this method may yield wrong results for large archives, use #getBytesRead insteadGets the current number of bytes read from this stream.- Returns:
- the number of read bytes
-
getUncompressedCount
public long getUncompressedCount()
Gets the amount of raw or compressed bytes read by the stream.This implementation invokes
getBytesRead().Provides half of
InputStreamStatisticswithout forcing subclasses to implement the other half.- Returns:
- the amount of decompressed bytes returned by the stream
- Since:
- 1.17
-
-