|
|||||||||
| 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.ibisph.filter.gzip.ResponseStream
public class ResponseStream
Provides gzip stream compression for the gzip filter and response wrapper.
| Field Summary | |
|---|---|
protected javax.servlet.ServletOutputStream |
destinationOutputStream
|
protected java.util.zip.GZIPOutputStream |
gzipOutputStream
|
| Constructor Summary | |
|---|---|
ResponseStream(javax.servlet.http.HttpServletResponse response)
Constructor which saves original destination response and creates a new gzip output stream. |
|
| Method Summary | |
|---|---|
void |
close()
Core method that causes the captured content to be zipped and streamed back. |
void |
flush()
Flushes the captured gzipped output stream but does not close. |
void |
write(byte b)
Overridden method that captures data to the buffered byte array which is then gzipped. |
void |
write(byte[] b)
Overridden method that captures data to the buffered byte array which is then gzipped. |
void |
write(byte[] b,
int off,
int len)
Overridden method that captures data to the buffered byte array which is then gzipped. |
void |
write(int b)
Overridden method that captures data to the buffered byte array which is then gzipped. |
| 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 javax.servlet.ServletOutputStream destinationOutputStream
protected java.util.zip.GZIPOutputStream gzipOutputStream
| Constructor Detail |
|---|
public ResponseStream(javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
response - Original response object which contains the "real"
destination output stream.
java.io.IOException| Method Detail |
|---|
public void write(byte b)
throws java.io.IOException
b - Value to be written to the output stream.
java.io.IOException - standard IOException associated with write operation.
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamb - Value to be written to the output stream.
java.io.IOException
public void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamb - Array of values to be written to the output stream.
java.io.IOException
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamb - Array of values to be written to the output stream.off - Offset of where to write the bytes to the new captured output
stream.len - Number of bytes to the new captured output stream.
java.io.IOException
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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||