Class CompressorInputStream
java.lang.Object
java.io.InputStream
org.apache.commons.compress.compressors.CompressorInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
AbstractLZ77CompressorInputStream
,BrotliCompressorInputStream
,BZip2CompressorInputStream
,Deflate64CompressorInputStream
,DeflateCompressorInputStream
,FramedLZ4CompressorInputStream
,FramedSnappyCompressorInputStream
,GzipCompressorInputStream
,LZMACompressorInputStream
,LZWInputStream
,Pack200CompressorInputStream
,XZCompressorInputStream
,ZstdCompressorInputStream
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the current number of bytes read from this stream.int
getCount()
Deprecated.this method may yield wrong results for large archives, use #getBytesRead insteadlong
Returns the amount of raw or compressed bytes read by the stream.Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
CompressorInputStream
public CompressorInputStream()
-
-
Method Details
-
getBytesRead
public long getBytesRead()Returns the current number of bytes read from this stream.- Returns:
- the number of read bytes
- Since:
- 1.1
-
getCount
Deprecated.this method may yield wrong results for large archives, use #getBytesRead insteadReturns the current number of bytes read from this stream.- Returns:
- the number of read bytes
-
getUncompressedCount
public long getUncompressedCount()Returns the amount of raw or compressed bytes read by the stream.This implementation invokes
getBytesRead()
.Provides half of
InputStreamStatistics
without forcing subclasses to implement the other half.- Returns:
- the amount of decompressed bytes returned by the stream
- Since:
- 1.17
-