HttpServletResponse.
| Modifier and Type | Class and Description |
|---|---|
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| private Integer | |
| private String | |
| private static final int | |
| private static final int | |
| private long | |
| private String | |
| private final HttpServerExchange | |
| private int | |
| private static final int | |
| private static final int | |
| private Locale | |
| private final ServletContextImpl | |
| private static final int | |
| private HttpServletResponseImpl. | |
| private volatile ServletContextImpl | |
| private ServletOutputStreamImpl | |
| private Supplier | |
| private static final int | |
| private PrintWriter |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addCookie(final Cookie
the Cookie to return to the client newCookie)Implements jakarta. Adds the specified cookie to the response. |
| public void | addDateHeader(final String
the name of the header to set name, final long the additional date value date)Implements jakarta. Adds a response header with the given name and date-value. |
| public void | addHeader(final String
the name of the header name, final 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 jakarta. Adds a response header with the given name and value. |
| public void | |
| public void | addIntHeader(final String
the name of the header name, final int the assigned integer value value)Implements jakarta. Adds a response header with the given name and integer value. |
| public void | |
| public boolean | containsHeader(final String
the header name name)Implements jakarta. Returns a boolean indicating whether the named response header has already been set. |
| private void | |
| public void | |
| private boolean | |
| public String | encodeRedirectURL(String
URL to be encoded url)Implements jakarta. Encode the session identifier associated with this response into the specified redirect URL, if necessary. |
| public String | encodeURL(String
the url to be encoded. url)Implements jakarta. Encodes the specified URL by including the session ID, or, if encoding is not needed, returns the URL unchanged. |
| private static String | |
| public void | flushBuffer()
Implements jakarta. Forces any content in the buffer to be written to the client. |
| public void | |
| 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 long | |
| public String | getContentType()
Implements jakarta. Returns the content type used for the MIME body sent in this response. |
| public HttpServerExchange | |
| public String | getHeader(final String
the name of the response header whose value to return name)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(final String
the name of the response header whose values to return name)Implements jakarta. Gets the values of the response header with the given name. |
| public Locale | getLocale()
Implements jakarta. Returns the locale specified for this response using the |
| public ServletOutputStream | getOutputStream()
Implements jakarta. Returns a |
| public ServletContextImpl | |
| 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 |
| private boolean | |
| public boolean | isCommitted()
Implements jakarta. Returns a boolean indicating if the response has been committed. |
| private boolean | isEncodeable(final String
Absolute URL to be validated location)Return |
| pack-priv boolean | |
| public boolean | |
| public boolean | |
| 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 | |
| private boolean | |
| public void | sendError(final int
the error status code sc, final String the descriptive message msg)Implements jakarta. Sends an error response to the client using the specified status and clears the buffer. |
| public void | sendError(final int
the error status code sc)Implements jakarta. Sends an error response to the client using the specified status code and clears the buffer. |
| public void | sendRedirect(final String
the redirect location URL location)Implements jakarta. Sends a temporary redirect response to the client using the specified redirect location URL and clears the buffer. |
| public void | setBufferSize(final int
the preferred buffer size size)Implements jakarta. Sets the preferred buffer size for the body of the response. |
| public void | setCharacterEncoding(final String
a String specifying only the character set defined by IANA Character Sets
(http://www.iana.org/assignments/character-sets) or charset)nullImplements jakarta. Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8. |
| pack-priv void | setContentFullyWritten()
Marks this response as closed for writing extra bytes, including the addition of headers. |
| public void | setContentLength(final int
an integer specifying the length of the content being returned to the client; sets the Content-Length
header 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(final long
a long specifying the length of the content being returned to the client; sets the Content-Length header 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(final String
a type)String specifying the MIME type of the content or nullImplements jakarta. Sets the content type of the response being sent to the client, if the response has not been committed yet. |
| public void | setDateHeader(final String
the name of the header to set name, final long the assigned date value date)Implements jakarta. Sets a response header with the given name and date-value. |
| public void | setHeader(final String
the name of the header name, final 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 jakarta. Sets a response header with the given name and value. |
| public void | |
| pack-priv void | |
| public void | |
| public void | setIntHeader(final String
the name of the header name, final int the assigned integer value value)Implements jakarta. Sets a response header with the given name and integer value. |
| public void | setLocale(final Locale
the locale of the response or {code @null} loc)Implements jakarta. Sets the locale of the response, if the response has not been committed yet. |
| public void | |
| public void | setStatus(final int
the status code sc)Implements jakarta. Sets the status code for this response. |
| public void | setTrailerFields(Supplier<Map<String, String>>
the supplier of trailer headers supplier)Overrides default jakarta. Sets the supplier of trailer headers. |
| private String | toAbsolute(String
URL to be (possibly) converted and then returned location)Convert (if necessary) and return the absolute URL that represents the resource referenced by this possibly relative URL. |