Class DeflaterReader
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.activemq.artemis.utils.DeflaterReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class DeflaterReader extends InputStream
A DeflaterReader The reader takes an inputstream and compress it. Not for concurrent use.
-
-
Constructor Summary
Constructors Constructor Description DeflaterReader(InputStream inData, AtomicLong bytesRead)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseStream()longgetTotalSize()intread()intread(byte[] buffer, int offset, int len)Try to fill the buffer with compressed bytes.-
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
DeflaterReader
public DeflaterReader(InputStream inData, AtomicLong bytesRead)
-
-
Method Detail
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] buffer, int offset, int len) throws IOExceptionTry to fill the buffer with compressed bytes. Except the last effective read, this method always returns with a full buffer of compressed data.- Overrides:
readin classInputStream- Parameters:
buffer- the buffer to fill compressed bytes- Returns:
- the number of bytes really filled, -1 indicates end.
- Throws:
IOException
-
closeStream
public void closeStream() throws IOException- Throws:
IOException
-
getTotalSize
public long getTotalSize()
-
-