Response object. All methods are delegated to the wrapped response.
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private static final ThreadCache. | |
| private static final Logger | |
| private final ServletOutputStreamImpl | |
| protected Response | response
The wrapped response. |
| protected HttpServletRequestImpl | |
| protected boolean | usingOutputStream
Using output stream flag. |
| protected boolean | usingWriter
Using writer flag. |
| private ServletWriterImpl |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | addCookie(Cookie cookie)
Implements jakarta. Adds the specified cookie to the response. |
| public void | addDateHeader(String name, long date)
Implements jakarta. Adds a response header with the given name and date-value. |
| public void | addHeader(String name, String value)
Implements jakarta. Adds a response header with the given name and value. |
| public void | addIntHeader(String name, int value)
Implements jakarta. Adds a response header with the given name and integer value. |
| protected Object | |
| public boolean | containsHeader(String name)
Implements jakarta. Returns a boolean indicating whether the named response header has already been set. |
| public static HttpServletResponseImpl | |
| public String | encodeRedirectURL(String url)
Implements jakarta. Encodes the specified URL for use in the |
| public String | encodeURL(String url)
Implements jakarta. Encodes the specified URL by including the session ID, or, if encoding is not needed, returns the URL unchanged. |
| public void | |
| public void | flushBuffer()
Implements jakarta. Forces any content in the buffer to be written to the client. |
| public int | getBufferSize()
Implements jakarta. Returns the actual buffer size used for the response. |
| public String | getCharacterEncoding()
Implements jakarta. Returns the name of the character encoding (MIME charset) used for the body sent in this response. |
| public String | getContentType()
Implements jakarta. Returns the content type used for the MIME body sent in this response. |
| public String | getHeader(String string)
Implements jakarta. Gets the value of the response header with the given name. |
| public Collection | getHeaderNames()
Implements jakarta. Gets the names of the headers of this response. |
| public Collection | getHeaders(String string)
Implements jakarta. Gets the values of the response header with the given name. |
| public Response | getInternalResponse()
Implements org. Returns internal Grizzly |
| public Locale | getLocale()
Implements jakarta. Returns the locale specified for this response using the |
| public String | |
| public ServletOutputStream | getOutputStream()
Implements jakarta. Returns a |
| public Response | |
| public int | getStatus()
Implements jakarta. Gets the current status code of this response. |
| public Supplier | getTrailerFields()
Overrides default jakarta. Gets the supplier of trailer headers. |
| public PrintWriter | getWriter()
Implements jakarta. Returns a |
| public void | |
| public boolean | isCommitted()
Implements jakarta. Returns a boolean indicating if the response has been committed. |
| public boolean | |
| pack-priv void | |
| public void | reset()
Implements jakarta. Clears any data that exists in the buffer as well as the status code, headers. |
| public void | resetBuffer()
Implements jakarta. Clears the content of the underlying buffer in the response without clearing headers or status code. |
| public void | |
| public void | sendError(int sc, String msg)
Implements jakarta. Sends an error response to the client using the specified status and clears the buffer. |
| public void | sendError(int sc)
Implements jakarta. Sends an error response to the client using the specified status code and clears the buffer. |
| public void | sendRedirect(String location)
Overrides default jakarta. Sends a redirect response to the client using the specified redirect location URL with the status code
|
| public void | sendRedirect(String location, int sc, boolean clearBuffer)
Implements jakarta. Sends a redirect response to the client using the specified redirect location URL and status code, optionally clears the response buffer and commits the response. |
| public void | setBufferSize(int size)
Implements jakarta. Sets the preferred buffer size for the body of the response. |
| public void | setCharacterEncoding(String charEnc)
Implements jakarta. Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8. |
| public void | setContentLength(int len)
Implements jakarta. Sets the length of the content body in the response In HTTP servlets, this method sets the HTTP Content-Length header. |
| public void | setContentLengthLong(long len)
Implements jakarta. Sets the length of the content body in the response In HTTP servlets, this method sets the HTTP Content-Length header. |
| public void | setContentType(String type)
Implements jakarta. Sets the content type of the response being sent to the client, if the response has not been committed yet. |
| public void | setDateHeader(String name, long date)
Implements jakarta. Sets a response header with the given name and date-value. |
| public void | setHeader(String name, String value)
Implements jakarta. Sets a response header with the given name and value. |
| public void | setIntHeader(String name, int value)
Implements jakarta. Sets a response header with the given name and integer value. |
| public void | setLocale(Locale loc)
Implements jakarta. Sets the locale of the response, if the response has not been committed yet. |
| public void | setStatus(int sc)
Implements jakarta. Sets the status code for this response. |
| public void | setTrailerFields(final Supplier<Map<String, String>> supplier)
Overrides default jakarta. Sets the supplier of trailer headers. |