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()
Gets the amount of raw or compressed bytes read by the stream.long
getUncompressedCount()
Gets the amount of decompressed bytes returned by the stream.int
read()
int
read(byte[] b, int off, int len)
-
-
-
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
-
getCompressedCount
public long getCompressedCount()
Description copied from interface:InputStreamStatistics
Gets the amount of raw or compressed bytes read by the stream.- Specified by:
getCompressedCount
in interfaceInputStreamStatistics
- Returns:
- the amount of raw or compressed bytes read by the stream.
-
getUncompressedCount
public long getUncompressedCount()
Description copied from interface:InputStreamStatistics
Gets the amount of decompressed bytes returned by the stream.- Specified by:
getUncompressedCount
in interfaceInputStreamStatistics
- Returns:
- the amount of decompressed bytes returned by the stream.
-
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
-
-