javax.servlet.http.HttpServletResponse
| Access | Constructor and Description |
|---|---|
| public | HttpServletResponseWrapper(HttpServletResponse
the response)HttpServletResponse to be wrapped.Constructs a response adaptor wrapping the given response. |
| Modifier and Type | Method and Description |
|---|---|
| private HttpServletResponse | |
| public void | addCookie(Cookie
the Cookie to return to the client cookie)Implements javax. |
| public void | addDateHeader(String
the name of the header to set name, long the additional date value date)Implements javax. |
| public void | addHeader(String
the name of the header name, String the additional header value If it contains
octet string, it should be encoded
according to RFC 2047
(http://www.ietf.org/rfc/rfc2047.txt) value)Implements javax. |
| public void | addIntHeader(String
the name of the header name, int the assigned integer value value)Implements javax. |
| public boolean | containsHeader(String
the header name name)Implements javax. |
| public String | encodeRedirectURL(String
the url to be encoded. url)Implements javax. |
| public String | encodeRedirectUrl(String
the url to be encoded. url)Implements javax.
Deprecated
As of version 2.1, use
The default behavior of this method is to return
encodeRedirectUrl(String url) on the wrapped response object.
encodeRedirectURL(String url) instead
|
| public String | encodeURL(String
the url to be encoded. url)Implements javax. |
| public String | encodeUrl(String
the url to be encoded. url)Implements javax.
Deprecated
As of version 2.1, use
The default behavior of this method is to call encodeUrl(String url)
on the wrapped response object.
encodeURL(String url)
instead
|
| public String | Returns: the value of the response header with the given name, or null if no header with the given name has been set on the wrapped responsethe name of the response header whose value to return name)Implements javax. HttpServletResponse#getHeader on the wrapped response
object.
|
| public Collection | Returns: a (possibly empty)Collection of the names
of the response headersImplements javax. HttpServletResponse#getHeaderNames on the wrapped response
object.
|
| public Collection | Returns: a (possibly empty)Collection of the values
of the response header with the given namethe name of the response header whose values to return name)Implements javax. HttpServletResponse#getHeaders on the wrapped response
object.
|
| public int | Returns: the current status code of the wrapped responseImplements javax. HttpServletResponse#getStatus on the wrapped response
object.
|
| public Supplier | Returns: supplier of trailer headersOverrides default javax. HttpServletResponse#getTrailerFields on the wrapped response
object.
|
| public void | sendError(int
the error status code sc, String the descriptive message msg)Implements javax. |
| public void | sendError(int
the error status code sc)Implements javax. |
| public void | sendRedirect(String
the redirect location URL location)Implements javax. |
| public void | setDateHeader(String
the name of the header to set name, long the assigned date value date)Implements javax. |
| public void | setHeader(String
the name of the header name, String the header value If it contains octet string,
it should be encoded according to RFC 2047
(http://www.ietf.org/rfc/rfc2047.txt) value)Implements javax. |
| public void | setIntHeader(String
the name of the header name, int the assigned integer value value)Implements javax. |
| public void | setStatus(int
the status code sc)Implements javax. |
| public void | setStatus(int
the status code sc, String the status message sm)Implements javax.
Deprecated
As of version 2.1, due to ambiguous meaning of the
message parameter.
The default behavior of this method is to call
setStatus(int sc, String sm) on the wrapped response object.
|
| public void | setTrailerFields(Supplier<Map<String, String>>
of trailer headers supplier)Overrides default javax. HttpServletResponse#setTrailerFields on the wrapped response
object.
|
| HttpServletResponseWrapper | back to summary |
|---|---|
| public HttpServletResponseWrapper(HttpServletResponse response) Constructs a response adaptor wrapping the given response.
| |
| _getHttpServletResponse | back to summary |
|---|---|
| private HttpServletResponse _getHttpServletResponse() | |
| addCookie | back to summary |
|---|---|
| public void addCookie(Cookie cookie) Implements javax. The default behavior of this method is to call addCookie(Cookie cookie) on the wrapped response object.
| |
| addDateHeader | back to summary |
|---|---|
| public void addDateHeader(String name, long date) Implements javax. The default behavior of this method is to call addDateHeader(String name, long date) on the wrapped response object.
| |
| addHeader | back to summary |
|---|---|
| public void addHeader(String name, String value) Implements javax. The default behavior of this method is to return addHeader(String name, String value) on the wrapped response object.
| |
| addIntHeader | back to summary |
|---|---|
| public void addIntHeader(String name, int value) Implements javax. The default behavior of this method is to call addIntHeader(String name, int value) on the wrapped response object.
| |
| containsHeader | back to summary |
|---|---|
| public boolean containsHeader(String name) Implements javax. The default behavior of this method is to call containsHeader(String name) on the wrapped response object.
| |
| encodeRedirectURL | back to summary |
|---|---|
| public String encodeRedirectURL(String url) Implements javax. The default behavior of this method is to return encodeRedirectURL(String url) on the wrapped response object.
| |
| encodeRedirectUrl | back to summary |
|---|---|
| public String encodeRedirectUrl(String url) Implements javax. Deprecated As of version 2.1, use
The default behavior of this method is to return encodeRedirectUrl(String url) on the wrapped response object.
| |
| encodeURL | back to summary |
|---|---|
| public String encodeURL(String url) Implements javax. The default behavior of this method is to call encodeURL(String url) on the wrapped response object.
| |
| encodeUrl | back to summary |
|---|---|
| public String encodeUrl(String url) Implements javax. Deprecated As of version 2.1, use The default behavior of this method is to call encodeUrl(String url) on the wrapped response object.
| |
| getHeader | back to summary |
|---|---|
| public String getHeader(String name) Implements javax. The default behaviour of this method is to call
| |
| getHeaderNames | back to summary |
|---|---|
| public Collection Implements javax. The default behaviour of this method is to call
Any changes to the returned
| |
| getHeaders | back to summary |
|---|---|
| public Collection Implements javax. The default behaviour of this method is to call
Any changes to the returned
| |
| getStatus | back to summary |
|---|---|
| public int getStatus() Implements javax. The default behaviour of this method is to call
| |
| getTrailerFields | back to summary |
|---|---|
| public Supplier Overrides default javax. The default behaviour of this method is to call
| |
| sendError | back to summary |
|---|---|
| public void sendError(int sc, String msg) throws IOException Implements javax. The default behavior of this method is to call sendError(int sc, String msg) on the wrapped response object.
| |
| sendError | back to summary |
|---|---|
| public void sendError(int sc) throws IOException Implements javax. The default behavior of this method is to call sendError(int sc) on the wrapped response object.
| |
| sendRedirect | back to summary |
|---|---|
| public void sendRedirect(String location) throws IOException Implements javax. The default behavior of this method is to return sendRedirect(String location) on the wrapped response object.
| |
| setDateHeader | back to summary |
|---|---|
| public void setDateHeader(String name, long date) Implements javax. The default behavior of this method is to call setDateHeader(String name, long date) on the wrapped response object.
| |
| setHeader | back to summary |
|---|---|
| public void setHeader(String name, String value) Implements javax. The default behavior of this method is to return setHeader(String name, String value) on the wrapped response object.
| |
| setIntHeader | back to summary |
|---|---|
| public void setIntHeader(String name, int value) Implements javax. The default behavior of this method is to call setIntHeader(String name, int value) on the wrapped response object.
| |
| setStatus | back to summary |
|---|---|
| public void setStatus(int sc) Implements javax. The default behavior of this method is to call setStatus(int sc) on the wrapped response object.
| |
| setStatus | back to summary |
|---|---|
| public void setStatus(int sc, String sm) Implements javax. Deprecated As of version 2.1, due to ambiguous meaning of the
message parameter. To set a status code
use The default behavior of this method is to call setStatus(int sc, String sm) on the wrapped response object.
| |
| setTrailerFields | back to summary |
|---|---|
| public void setTrailerFields(Supplier<Map<String, String>> supplier) Overrides default javax. The default behaviour of this method is to call
| |