public class ResponseWrapper extends java.lang.Object implements Response
Response that delegates all method invocations to a delegate
 instance. This is used as a base class for overriding just some behaviors of Response.| Constructor and Description | 
|---|
| ResponseWrapper(Response response) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addHeader(java.lang.String name,
         java.lang.String value)Adds a response header with the given name and value, not overwriting any previous values which
 may have already been added. | 
| void | disableCompression()Invoked to indicate that the response content is either already compressed, or is not compressable. | 
| java.lang.String | encodeRedirectURL(java.lang.String URL)Encodes the URL for use as a redirect, ensuring that a session id is included (if a session exists, and as
 necessary depending on the client browser's use of cookies). | 
| java.lang.String | encodeURL(java.lang.String URL)Encodes the URL, ensuring that a session id is included (if a session exists, and as necessary depending on the
 client browser's use of cookies). | 
| java.io.OutputStream | getOutputStream(java.lang.String contentType)Returns an OutputStream to which byte-oriented output may be sent. | 
| java.io.PrintWriter | getPrintWriter(java.lang.String contentType)Returns a PrintWriter object to which output may be sent. | 
| boolean | isCommitted()Returns true if the response has already been sent, either as a redirect or as a stream of content. | 
| void | sendError(int sc,
         java.lang.String message)Sends an error response to the client using the specified status. | 
| void | sendRedirect(Link link)Sends a redirect to a link. | 
| void | sendRedirect(java.lang.String URL)Sends a redirect to the client. | 
| void | setContentLength(int length)Sets the length of the content body in the response; this method sets the HTTP Content-Length header. | 
| void | setDateHeader(java.lang.String name,
             long date)Sets a response header with the given name and date-value. | 
| void | setHeader(java.lang.String name,
         java.lang.String value)Sets a response header with the given name and value. | 
| void | setIntHeader(java.lang.String name,
            int value)Sets a response header with the given name and integer value. | 
| void | setStatus(int sc)Sets the status code for this response. | 
public ResponseWrapper(Response response)
public java.io.PrintWriter getPrintWriter(java.lang.String contentType) throws java.io.IOException
ResponsegetPrintWriter in interface ResponsecontentType - the MIME content type for the output, typically "text/html"java.io.IOExceptionpublic java.io.OutputStream getOutputStream(java.lang.String contentType) throws java.io.IOException
ResponsegetOutputStream in interface ResponsecontentType - the MIME content type for the output, often "application/octet-stream" or "text/plain" or one
            of several othersjava.io.IOExceptionpublic void sendRedirect(java.lang.String URL) throws java.io.IOException
ResponsesendRedirect in interface ResponseURL - full or partial (relative) URL to send to the clientjava.io.IOExceptionResponse.encodeRedirectURL(String)public void sendRedirect(Link link) throws java.io.IOException
ResponsesendRedirect in interface Responselink - link to redirect to.java.io.IOExceptionpublic void setStatus(int sc)
ResponsesendError method should be used instead.public void sendError(int sc, java.lang.String message) throws java.io.IOException
Responsepublic void setContentLength(int length)
ResponsesetContentLength in interface Responselength - the length of the contentpublic void setDateHeader(java.lang.String name, long date)
ResponsesetDateHeader in interface Responsename - the name of the header to setdate - the assigned date valuepublic void setHeader(java.lang.String name, java.lang.String value)
Responsepublic void addHeader(java.lang.String name, java.lang.String value)
Responsepublic void setIntHeader(java.lang.String name, int value)
ResponsesetIntHeader in interface Responsename - the name of the header to setvalue - the assigned integer valuepublic java.lang.String encodeURL(java.lang.String URL)
Responsepublic java.lang.String encodeRedirectURL(java.lang.String URL)
ResponseencodeRedirectURL in interface Responsepublic boolean isCommitted()
ResponseisCommitted in interface Responsepublic void disableCompression()
ResponsedisableCompression in interface Response${project.version} - Copyright © 2003-2015 The Apache Software Foundation.