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 Details

  • Method Details

    • read

      public int read() throws IOException
      Specified by:
      read in class InputStream
      Throws:
      IOException
    • read

      public int read(byte[] buffer, int offset, int len) throws IOException
      Try to fill the buffer with compressed bytes. Except the last effective read, this method always returns with a full buffer of compressed data.
      Overrides:
      read in class InputStream
      Parameters:
      buffer - the buffer to fill compressed bytes
      Returns:
      the number of bytes really filled, -1 indicates end
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class InputStream
      Throws:
      IOException
    • getTotalSize

      public long getTotalSize()
    • setLevel

      public void setLevel(int level)