|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
javax.servlet.ServletOutputStream
org.jumpmind.symmetric.web.compression.CompressionResponseStream
public class CompressionResponseStream
Implementation of ServletOutputStream that works with the CompressionServletResponseWrapper implementation. This package is derived from the Jakarta Tomcat examples compression filter and is distributed in SymmetricDS for convenience.
| Field Summary | |
|---|---|
protected boolean |
closed
Has this stream been closed? |
protected java.io.OutputStream |
gzipstream
The underlying gzip output stream to which we should write data. |
protected javax.servlet.http.HttpServletResponse |
response
The response with which this servlet output stream is associated. |
| Constructor Summary | |
|---|---|
CompressionResponseStream(javax.servlet.http.HttpServletResponse response)
Construct a servlet output stream associated with the specified Response. |
|
| Method Summary | |
|---|---|
void |
close()
Close this output stream, causing any buffered data to be flushed and any further output data to throw an IOException. |
boolean |
closed()
Has this response stream been closed? |
void |
flush()
Flush any buffered data for this output stream, which also causes the response to be committed. |
void |
write(byte[] b)
Write b.length bytes from the specified byte array to our
output stream. |
void |
write(byte[] b,
int off,
int len)
Write len bytes from the specified byte array, starting at
the specified offset, to our output stream. |
void |
write(int b)
Write the specified byte to our output stream. |
| 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, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.io.OutputStream gzipstream
protected boolean closed
protected javax.servlet.http.HttpServletResponse response
| Constructor Detail |
|---|
public CompressionResponseStream(javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
response - The associated response
java.io.IOException| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOException
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamb - The byte to be written
java.io.IOException - if an input/output error occurs
public void write(byte[] b)
throws java.io.IOException
b.length bytes from the specified byte array to our
output stream.
write in class java.io.OutputStreamb - The byte array to be written
java.io.IOException - if an input/output error occurs
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
len bytes from the specified byte array, starting at
the specified offset, to our output stream.
write in class java.io.OutputStreamb - The byte array containing the bytes to be writtenoff - Zero-relative starting offset of the bytes to be writtenlen - The number of bytes to be written
java.io.IOException - if an input/output error occurspublic boolean closed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||