Example usage for Java javax.servlet ServletResponse fields, constructors, methods, implement or subclass
The text is from its open source code.
void | flushBuffer() Forces any content in the buffer to be written to the client. |
String | getCharacterEncoding() Returns the name of the character encoding (MIME charset) used for the body sent in this response. |
Class> | getClass() Returns the runtime class of this Object . |
String | getContentType() Returns the content type used for the MIME body sent in this response. |
ServletOutputStream | getOutputStream() Returns a ServletOutputStream suitable for writing binary data in the response. |
PrintWriter | getWriter() Returns a PrintWriter object that can send character text to the client. |
boolean | isCommitted() Returns a boolean indicating if the response has been committed. |
void | reset() Clears any data that exists in the buffer as well as the status code, headers. |
void | resetBuffer() Clears the content of the underlying buffer in the response without clearing headers or status code. |
void | setBufferSize(int size) Sets the preferred buffer size for the body of the response. |
void | setCharacterEncoding(String charset) Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8. |
void | setContentLength(int len) Sets the length of the content body in the response In HTTP servlets, this method sets the HTTP Content-Length header. |
void | setContentType(String type) Sets the content type of the response being sent to the client, if the response has not been committed yet. |
void | setLocale(Locale loc) Sets the locale of the response, if the response has not been committed yet. |
String | toString() Returns a string representation of the object. |