Class SpdyDeflaterOutputStream

java.lang.Object
java.io.OutputStream
org.glassfish.grizzly.spdy.compression.SpdyDeflaterOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class SpdyDeflaterOutputStream extends OutputStream
Author:
oleksiys
  • Constructor Details

    • SpdyDeflaterOutputStream

      public SpdyDeflaterOutputStream(org.glassfish.grizzly.memory.MemoryManager mm, int level)
    • SpdyDeflaterOutputStream

      public SpdyDeflaterOutputStream(org.glassfish.grizzly.memory.MemoryManager mm, Deflater deflater)
  • Method Details

    • getDeflater

      public Deflater getDeflater()
      Returns the underlying Deflater.
    • getBufferSize

      public int getBufferSize()
    • setBufferSize

      public void setBufferSize(int bufferSize)
    • setInitialOutputBuffer

      public void setInitialOutputBuffer(org.glassfish.grizzly.Buffer buffer)
    • checkpoint

      public org.glassfish.grizzly.Buffer checkpoint()
    • write

      public void write(int b) throws IOException
      Specified by:
      write in class OutputStream
      Throws:
      IOException
    • write

      public void write(byte[] b, int off, int len) throws IOException
      Overrides:
      write in class OutputStream
      Throws:
      IOException
    • write

      public void write(org.glassfish.grizzly.Buffer buffer) throws IOException
      Throws:
      IOException
    • deflate

      protected int deflate()
      Writes next block of compressed data to the output stream.
      Throws:
      IOException - if an I/O error has occurred
    • deflate

      protected int deflate(int flush)
      Writes next block of compressed data to the output stream.
      Throws:
      IOException - if an I/O error has occurred
    • flush

      public void flush() throws IOException
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class OutputStream
      Throws:
      IOException
    • finish

      public void finish() throws IOException
      Finishes writing uncompressed data to the output stream without closing the underlying stream. Use this method when applying multiple filters in succession to the same output stream.
      Throws:
      IOException - if an I/O error occurs or this stream is already closed
    • closeStreamOnly

      public void closeStreamOnly()
      Closes the stream, but doesn't finishes the internal Deflater.
    • close

      public void close() throws IOException
      Writes any remaining uncompressed data to the output stream and closes the underlying output stream.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class OutputStream
      Throws:
      IOException - if an I/O error occurs
    • reset

      public void reset()