Java javax.servlet ServletResponse fields, constructors, methods, implement or subclass

Example usage for Java javax.servlet ServletResponse fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.servlet ServletResponse.

The text is from its open source code.

Implementation

javax.servlet.ServletResponse has the following implementations.
Click this link to see all its implementation.

Method

voidflushBuffer()
Forces any content in the buffer to be written to the client.
StringgetCharacterEncoding()
Returns the name of the character encoding (MIME charset) used for the body sent in this response.
ClassgetClass()
Returns the runtime class of this Object .
StringgetContentType()
Returns the content type used for the MIME body sent in this response.
ServletOutputStreamgetOutputStream()
Returns a ServletOutputStream suitable for writing binary data in the response.
PrintWritergetWriter()
Returns a PrintWriter object that can send character text to the client.
booleanisCommitted()
Returns a boolean indicating if the response has been committed.
voidreset()
Clears any data that exists in the buffer as well as the status code, headers.
voidresetBuffer()
Clears the content of the underlying buffer in the response without clearing headers or status code.
voidsetBufferSize(int size)
Sets the preferred buffer size for the body of the response.
voidsetCharacterEncoding(String charset)
Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8.
voidsetContentLength(int len)
Sets the length of the content body in the response In HTTP servlets, this method sets the HTTP Content-Length header.
voidsetContentType(String type)
Sets the content type of the response being sent to the client, if the response has not been committed yet.
voidsetLocale(Locale loc)
Sets the locale of the response, if the response has not been committed yet.
StringtoString()
Returns a string representation of the object.