Class InflaterInputStreamWithStatistics
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- java.util.zip.InflaterInputStream
-
- org.apache.commons.compress.archivers.zip.InflaterInputStreamWithStatistics
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,InputStreamStatistics
class InflaterInputStreamWithStatistics extends java.util.zip.InflaterInputStream implements InputStreamStatistics
Helper class to provide statistics- Since:
- 1.17
-
-
Field Summary
Fields Modifier and Type Field Description private longcompressedCountprivate longuncompressedCount
-
Constructor Summary
Constructors Constructor Description InflaterInputStreamWithStatistics(java.io.InputStream in)InflaterInputStreamWithStatistics(java.io.InputStream in, java.util.zip.Inflater inf)InflaterInputStreamWithStatistics(java.io.InputStream in, java.util.zip.Inflater inf, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfill()longgetCompressedCount()Gets the amount of raw or compressed bytes read by the stream.longgetUncompressedCount()Gets the amount of decompressed bytes returned by the stream.intread()intread(byte[] b, int off, int len)-
Methods inherited from class java.util.zip.InflaterInputStream
available, close, mark, markSupported, reset, skip
-
-
-
-
Constructor Detail
-
InflaterInputStreamWithStatistics
InflaterInputStreamWithStatistics(java.io.InputStream in)
-
InflaterInputStreamWithStatistics
InflaterInputStreamWithStatistics(java.io.InputStream in, java.util.zip.Inflater inf)
-
InflaterInputStreamWithStatistics
InflaterInputStreamWithStatistics(java.io.InputStream in, java.util.zip.Inflater inf, int size)
-
-
Method Detail
-
fill
protected void fill() throws java.io.IOException- Overrides:
fillin classjava.util.zip.InflaterInputStream- Throws:
java.io.IOException
-
getCompressedCount
public long getCompressedCount()
Description copied from interface:InputStreamStatisticsGets the amount of raw or compressed bytes read by the stream.- Specified by:
getCompressedCountin interfaceInputStreamStatistics- Returns:
- the amount of raw or compressed bytes read by the stream.
-
getUncompressedCount
public long getUncompressedCount()
Description copied from interface:InputStreamStatisticsGets the amount of decompressed bytes returned by the stream.- Specified by:
getUncompressedCountin interfaceInputStreamStatistics- Returns:
- the amount of decompressed bytes returned by the stream.
-
read
public int read() throws java.io.IOException- Overrides:
readin classjava.util.zip.InflaterInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.util.zip.InflaterInputStream- Throws:
java.io.IOException
-
-