jakarta.servlet.http.HttpServletResponse wrapper that caches all content written to
the output stream and writer,
and allows this content to be retrieved via a byte array.
Used e.g. by org..
ContentCachingRequestWrapper
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final FastByteArrayOutputStream | |
| private Integer | |
| private String | |
| private ServletOutputStream | |
| private PrintWriter |
| Access | Constructor and Description |
|---|---|
| public | ContentCachingResponseWrapper(HttpServletResponse
the original servlet response response)Create a new ContentCachingResponseWrapper for the given servlet response. |
| Modifier and Type | Method and Description |
|---|---|
| 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)Overrides jakarta. Implements jakarta. |
| public void | addIntHeader(String
the name of the header name, int the assigned integer value value)Overrides jakarta. Implements jakarta. |
| public boolean | containsHeader(String
the header name name)Overrides jakarta. Implements jakarta. |
| public void | |
| protected void | copyBodyToResponse(boolean
whether to set a corresponding content length
for the complete cached body content complete)Copy the cached body content to the response. |
| public void | flushBuffer()
Overrides jakarta. Implements jakarta. |
| public byte[] | |
| public InputStream | |
| public int | |
| public String | getContentType()
Overrides jakarta. Implements jakarta. |
| public String | getHeader(String
Header name to look up name)Overrides jakarta. Implements jakarta. null if this header has not been set.
|
| public Collection | getHeaderNames()
Overrides jakarta. Implements jakarta. |
| public Collection | getHeaders(String
Header name to look up name)Overrides jakarta. Implements jakarta. |
| public ServletOutputStream | getOutputStream()
Overrides jakarta. Implements jakarta. ServletOutputStream suitable for writing binary data in the response.
|
| public PrintWriter | getWriter()
Overrides jakarta. Implements jakarta. PrintWriter object that can send character text to the client.
|
| public void | reset()
Overrides jakarta. Implements jakarta. |
| public void | resetBuffer()
Overrides jakarta. Implements jakarta. |
| public void | sendError(int
the error status code sc)Overrides jakarta. Implements jakarta. |
| public void | sendError(int
the error status code sc, String the descriptive message msg)Overrides jakarta. Implements jakarta. |
| public void | sendRedirect(String
the redirect location URL (may be absolute or relative) location)Overrides jakarta. Implements jakarta. |
| public void | setBufferSize(int
the preferred buffer size size)Overrides jakarta. Implements jakarta. |
| public void | setContentLength(int
an integer specifying the length of the content being returned to the client; sets the Content-Length
header len)Overrides jakarta. Implements jakarta. |
| public void | setContentLengthLong(long
an integer specifying the length of the content being returned to the client; sets the
Content-Length header len)Overrides jakarta. Implements jakarta. |
| public void | setContentType(String
a type)String specifying the MIME type of the contentOverrides jakarta. Implements jakarta. |
| 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)Overrides jakarta. Implements jakarta. |
| public void | setIntHeader(String
the name of the header name, int the assigned integer value value)Overrides jakarta. Implements jakarta. |