net.sf.ehcache.constructs.web
public class GenericResponseWrapper extends HttpServletResponseWrapper implements Serializable
It is used to wrap the real Response so that we can modify it after that the target of the request has delivered its response.
It uses the Wrapper pattern.
Version: $Id: GenericResponseWrapper.java 80 2006-05-14 03:16:22Z gregluck $
Constructor Summary | |
---|---|
GenericResponseWrapper(HttpServletResponse response, OutputStream outstr)
Creates a GenericResponseWrapper |
Method Summary | |
---|---|
void | addCookie(Cookie cookie)
Adds a cookie. |
void | addHeader(String name, String value)
Adds a header. |
String | encodeRedirectUrl(String s)
Override the deprecated method and call non-deprecated method |
String | encodeUrl(String s)
Override the deprecated method and call non-deprecated method |
void | flush()
Flushes all the streams for this response. |
void | flushBuffer()
Flushes buffer and commits response to client. |
int | getContentLength()
Gets the content length. |
String | getContentType()
Gets the content type. |
Collection | getCookies()
Gets all the cookies. |
Collection | getHeaders()
Gets the headers. |
ServletOutputStream | getOutputStream()
Gets the outputstream. |
int | getStatus()
Returns the status code for this response.
|
PrintWriter | getWriter()
Gets the print writer. |
void | reset()
Resets the response. |
void | resetBuffer()
Resets the buffers. |
void | setContentLength(int length)
Sets the content length. |
void | setContentType(String type)
Sets the content type. |
void | setHeader(String name, String value) |
void | setStatus(int code)
Sets the status code for this response. |
void | setStatus(int code, String msg)
Sets the status code for this response. |
See Also: GenericResponseWrapper