Class SpdyDeflaterOutputStream
java.lang.Object
java.io.OutputStream
org.glassfish.grizzly.spdy.compression.SpdyDeflaterOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Author:
- oleksiys
-
Constructor Summary
ConstructorsConstructorDescriptionSpdyDeflaterOutputStream(org.glassfish.grizzly.memory.MemoryManager mm, int level) SpdyDeflaterOutputStream(org.glassfish.grizzly.memory.MemoryManager mm, Deflater deflater) -
Method Summary
Modifier and TypeMethodDescriptionorg.glassfish.grizzly.Buffervoidclose()Writes any remaining uncompressed data to the output stream and closes the underlying output stream.voidCloses the stream, but doesn't finishes the internalDeflater.protected intdeflate()Writes next block of compressed data to the output stream.protected intdeflate(int flush) Writes next block of compressed data to the output stream.voidfinish()Finishes writing uncompressed data to the output stream without closing the underlying stream.voidflush()intReturns the underlyingDeflater.voidreset()voidsetBufferSize(int bufferSize) voidsetInitialOutputBuffer(org.glassfish.grizzly.Buffer buffer) voidwrite(byte[] b, int off, int len) voidwrite(int b) voidwrite(org.glassfish.grizzly.Buffer buffer) Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
SpdyDeflaterOutputStream
public SpdyDeflaterOutputStream(org.glassfish.grizzly.memory.MemoryManager mm, int level) -
SpdyDeflaterOutputStream
-
-
Method Details
-
getDeflater
Returns the underlyingDeflater. -
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
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- 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
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
finish
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 internalDeflater. -
close
Writes any remaining uncompressed data to the output stream and closes the underlying output stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException- if an I/O error occurs
-
reset
public void reset()
-