|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.ServletResponseWrapper javax.servlet.http.HttpServletResponseWrapper compressionFilters.CompressionServletResponseWrapper
Implementation of HttpServletResponseWrapper that works with the CompressionServletResponseStream implementation..
Field Summary | |
protected String |
contentType
Content type |
protected static String |
info
Descriptive information about this Response implementation. |
protected HttpServletResponse |
origResponse
Original response |
protected ServletOutputStream |
stream
The ServletOutputStream that has been returned by getOutputStream() , if any. |
protected int |
threshold
The threshold number to compress |
protected PrintWriter |
writer
The PrintWriter that has been returned by getWriter() , if any. |
Constructor Summary | |
CompressionServletResponseWrapper(HttpServletResponse response)
Calls the parent constructor which creates a ServletResponse adaptor wrapping the given response object. |
Method Summary | |
ServletOutputStream |
createOutputStream()
Create and return a ServletOutputStream to write the content associated with this Response. |
void |
finishResponse()
Finish a response. |
void |
flushBuffer()
Flush the buffer and commit this response. |
ServletOutputStream |
getOutputStream()
Return the servlet output stream associated with this Response. |
PrintWriter |
getWriter()
Return the writer associated with this Response. |
void |
setCompressionThreshold(int threshold)
Set threshold number |
void |
setContentLength(int length)
|
void |
setContentType(String contentType)
Set content type |
void |
setDebugLevel(int debug)
Set debug level |
Methods inherited from class javax.servlet.http.HttpServletResponseWrapper |
addCookie, addDateHeader, addHeader, addIntHeader, containsHeader, encodeRedirectUrl, encodeRedirectURL, encodeUrl, encodeURL, sendError, sendError, sendRedirect, setDateHeader, setHeader, setIntHeader, setStatus, setStatus |
Methods inherited from class javax.servlet.ServletResponseWrapper |
getBufferSize, getCharacterEncoding, getContentType, getLocale, getResponse, isCommitted, reset, resetBuffer, setBufferSize, setCharacterEncoding, setLocale, setResponse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.ServletResponse |
getBufferSize, getCharacterEncoding, getContentType, getLocale, isCommitted, reset, resetBuffer, setBufferSize, setCharacterEncoding, setLocale |
Field Detail |
protected HttpServletResponse origResponse
protected static final String info
protected ServletOutputStream stream
getOutputStream()
, if any.
protected PrintWriter writer
getWriter()
, if any.
protected int threshold
protected String contentType
Constructor Detail |
public CompressionServletResponseWrapper(HttpServletResponse response)
Method Detail |
public void setContentType(String contentType)
public void setCompressionThreshold(int threshold)
public void setDebugLevel(int debug)
public ServletOutputStream createOutputStream() throws IOException
IOException
- if an input/output error occurspublic void finishResponse()
public void flushBuffer() throws IOException
IOException
- if an input/output error occurspublic ServletOutputStream getOutputStream() throws IOException
IllegalStateException
- if getWriter
has
already been called for this response
IOException
- if an input/output error occurspublic PrintWriter getWriter() throws IOException
IllegalStateException
- if getOutputStream
has
already been called for this response
IOException
- if an input/output error occurspublic void setContentLength(int length)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |