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 long
compressedCount
private long
uncompressedCount
-
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 void
fill()
long
getCompressedCount()
long
getUncompressedCount()
int
read()
int
read(byte[] b, int off, int len)
-
Methods inherited from class java.util.zip.InflaterInputStream
available, close, mark, markSupported, reset, skip
-
-
-
-
Constructor Detail
-
InflaterInputStreamWithStatistics
public InflaterInputStreamWithStatistics(java.io.InputStream in)
-
InflaterInputStreamWithStatistics
public InflaterInputStreamWithStatistics(java.io.InputStream in, java.util.zip.Inflater inf)
-
InflaterInputStreamWithStatistics
public InflaterInputStreamWithStatistics(java.io.InputStream in, java.util.zip.Inflater inf, int size)
-
-
Method Detail
-
fill
protected void fill() throws java.io.IOException
- Overrides:
fill
in classjava.util.zip.InflaterInputStream
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
- Overrides:
read
in classjava.util.zip.InflaterInputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.util.zip.InflaterInputStream
- Throws:
java.io.IOException
-
getCompressedCount
public long getCompressedCount()
- Specified by:
getCompressedCount
in interfaceInputStreamStatistics
- Returns:
- the amount of raw or compressed bytes read by the stream
-
getUncompressedCount
public long getUncompressedCount()
- Specified by:
getUncompressedCount
in interfaceInputStreamStatistics
- Returns:
- the amount of decompressed bytes returned by the stream
-
-