|
|||||||||
| Home >> All >> [ compressionFilters overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
compressionFilters
Class CompressionResponseStream

java.lang.Objectjava.io.OutputStream
javax.servlet.ServletOutputStream
compressionFilters.CompressionResponseStream
- public class CompressionResponseStream
- extends javax.servlet.ServletOutputStream
Implementation of ServletOutputStream that works with the CompressionServletResponseWrapper implementation.
- Version:
- $Revision: 267129 $, $Date: 2004-03-18 11:40:35 -0500 (Thu, 18 Mar 2004) $
| Field Summary | |
protected byte[] |
buffer
The buffer through which all of our output bytes are passed. |
protected int |
bufferCount
The number of data bytes currently in the buffer. |
protected boolean |
closed
Has this stream been closed? |
protected int |
compressionThreshold
The threshold number which decides to compress or not. |
private int |
debug
Debug level |
protected java.util.zip.GZIPOutputStream |
gzipstream
The underlying gzip output stream to which we should write data. |
protected int |
length
The content length past which we will not write, or -1 if there is no defined content length. |
protected javax.servlet.ServletOutputStream |
output
The underlying servket output stream to which we should write data. |
protected javax.servlet.http.HttpServletResponse |
response
The response with which this servlet output stream is associated. |
| Fields inherited from class javax.servlet.ServletOutputStream |
|
| 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 |
flushToGZip()
|
protected void |
setBuffer(int threshold)
Set the compressionThreshold number and create buffer for this size |
void |
setDebugLevel(int debug)
Set debug level |
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. |
void |
writeToGZip(byte[] b,
int off,
int len)
|
| 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 |
compressionThreshold
protected int compressionThreshold
- The threshold number which decides to compress or not.
Users can configure in web.xml to set it to fit their needs.
debug
private int debug
- Debug level
buffer
protected byte[] buffer
- The buffer through which all of our output bytes are passed.
bufferCount
protected int bufferCount
- The number of data bytes currently in the buffer.
gzipstream
protected java.util.zip.GZIPOutputStream gzipstream
- The underlying gzip output stream to which we should write data.
closed
protected boolean closed
- Has this stream been closed?
length
protected int length
- The content length past which we will not write, or -1 if there is
no defined content length.
response
protected javax.servlet.http.HttpServletResponse response
- The response with which this servlet output stream is associated.
output
protected javax.servlet.ServletOutputStream output
- The underlying servket output stream to which we should write data.
| Constructor Detail |
CompressionResponseStream
public CompressionResponseStream(javax.servlet.http.HttpServletResponse response) throws java.io.IOException
- Construct a servlet output stream associated with the specified Response.
| Method Detail |
setDebugLevel
public void setDebugLevel(int debug)
- Set debug level
setBuffer
protected void setBuffer(int threshold)
- Set the compressionThreshold number and create buffer for this size
close
public void close()
throws java.io.IOException
- Close this output stream, causing any buffered data to be flushed and
any further output data to throw an IOException.
flush
public void flush()
throws java.io.IOException
- Flush any buffered data for this output stream, which also causes the
response to be committed.
flushToGZip
public void flushToGZip()
throws java.io.IOException
write
public void write(int b)
throws java.io.IOException
- Write the specified byte to our output stream.
write
public void write(byte[] b)
throws java.io.IOException
- Write
b.lengthbytes from the specified byte array to our output stream.
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Write
lenbytes from the specified byte array, starting at the specified offset, to our output stream.
writeToGZip
public void writeToGZip(byte[] b,
int off,
int len)
throws java.io.IOException
closed
public boolean closed()
- Has this response stream been closed?
|
|||||||||
| Home >> All >> [ compressionFilters overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC