org.apache.coyote
public final class Response extends Object
| Field Summary | |
|---|---|
| protected String | characterEncoding |
| protected boolean | charsetSet
Has the charset been explicitly set. |
| protected boolean | commited
Committed flag. |
| protected String | contentLanguage |
| protected long | contentLength |
| protected String | contentType
HTTP specific fields. |
| protected Exception | errorException
Holds request error exception. |
| protected String | errorURI
Request error URI. |
| protected MimeHeaders | headers
Response headers. |
| ActionHook | hook
Action hook. |
| protected String | message
Status message. |
| protected Object[] | notes
Notes. |
| protected OutputBuffer | outputBuffer
Associated output buffer. |
| protected Request | req |
| protected int | status
Status code. |
| Constructor Summary | |
|---|---|
| Response() | |
| Method Summary | |
|---|---|
| void | acknowledge() |
| void | action(ActionCode actionCode, Object param) |
| void | addHeader(String name, String value) |
| boolean | containsHeader(String name)
Warning: This method always returns false |
| void | doWrite(ByteChunk chunk)
Write a chunk of bytes. |
| void | finish() |
| long | getBytesWritten() |
| String | getCharacterEncoding() |
| String | getContentLanguage()
Return the content language. |
| int | getContentLength() |
| long | getContentLengthLong() |
| String | getContentType() |
| Exception | getErrorException()
Get the Exception that occurred during request
processing. |
| String | getErrorURI() Get the request URI that caused the original error. |
| ActionHook | getHook() |
| Locale | getLocale() |
| String | getMessage()
Get the status message. |
| MimeHeaders | getMimeHeaders() |
| Object | getNote(int pos) |
| OutputBuffer | getOutputBuffer() |
| Request | getRequest() |
| int | getStatus() |
| boolean | isCommitted() |
| boolean | isExceptionPresent() |
| void | recycle() |
| void | reset() |
| void | sendHeaders() Signal that we're done with the headers, and body will follow.
|
| void | setBytesWritten(long bytesWritten) |
| void | setCharacterEncoding(String charset) |
| void | setCommitted(boolean v) |
| void | setContentLength(int contentLength) |
| void | setContentLength(long contentLength) |
| void | setContentType(String type)
Sets the content type.
|
| void | setErrorException(Exception ex)
Set the error Exception that occurred during
request processing. |
| void | setErrorURI(String uri)
Set request URI that caused an error during
request processing. |
| void | setHeader(String name, String value) |
| void | setHook(ActionHook hook) |
| void | setLocale(Locale locale)
Called explicitely by user to set the Content-Language and
the default encoding |
| void | setMessage(String message)
Set the status message. |
| void | setNote(int pos, Object value) |
| void | setOutputBuffer(OutputBuffer outputBuffer) |
| void | setRequest(Request req) |
| void | setStatus(int status)
Set the response status |
false for Content-Type
and Content-Length.Parameters: type the content type