com.planetj.servlet.filter.compression
Class CompressingServletOutputStream
java.lang.Object
java.io.OutputStream
javax.servlet.ServletOutputStream
com.planetj.servlet.filter.compression.CompressingServletOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
final class CompressingServletOutputStream
- extends javax.servlet.ServletOutputStream
Implementation of ServletOutputStream
which will optionally compress data written to it.
- Author:
- Sean Owen
Methods inherited from class javax.servlet.ServletOutputStream |
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
rawStream
private final java.io.OutputStream rawStream
compressingStreamFactory
private final CompressingStreamFactory compressingStreamFactory
compressingResponse
private final CompressingHttpServletResponse compressingResponse
context
private final CompressingFilterContext context
thresholdOutputStream
private ThresholdOutputStream thresholdOutputStream
closed
private boolean closed
CompressingServletOutputStream
CompressingServletOutputStream(java.io.OutputStream rawStream,
CompressingStreamFactory compressingStreamFactory,
CompressingHttpServletResponse compressingResponse,
CompressingFilterContext context)
write
public void write(byte[] b)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(byte[] b,
int offset,
int length)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(int b)
throws java.io.IOException
- Specified by:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Specified by:
flush
in interface java.io.Flushable
- Overrides:
flush
in class java.io.OutputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.OutputStream
- Throws:
java.io.IOException
toString
@NotNull
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
isClosed
boolean isClosed()
reset
void reset()
engageCompression
void engageCompression()
throws java.io.IOException
- Throws:
java.io.IOException
abortCompression
void abortCompression()
throws java.io.IOException
- Throws:
java.io.IOException
checkWriteState
private void checkWriteState()
checkClosed
private void checkClosed()
throws java.io.IOException
- Throws:
java.io.IOException