| org.apache.catalina.connector.HttpResponseBase org.apache.catalina.connector.http.HttpResponseImpl
HttpResponseImpl | final class HttpResponseImpl extends HttpResponseBase (Code) | | Implementation of HttpResponse specific to the HTTP connector.
author: Craig R. McClanahan author: Remy Maucherat version: $Revision: 1.13 $ $Date: 2002/03/18 07:15:40 $ |
Method Summary | |
public ServletOutputStream | createOutputStream() Create and return a ServletOutputStream to write the content
associated with this Response. | public void | finishResponse() Perform whatever actions are required to flush and close the output
stream or writer, in a single operation. | public String | getInfo() Return descriptive information about this Response implementation and
the corresponding version number, in the format
<description>/<version> . | protected String | getProtocol() Return the HTTP protocol version implemented by this response
object. | public boolean | isChunkingAllowed() True if chunking is allowed. | public boolean | isCloseConnection() Tests is the connection will be closed after the processing of the
request. | public boolean | isStreamInitialized() | public void | recycle() Release all object references, and initialize instance variables, in
preparation for reuse of this object. | public void | removeHeader(String name, String value) Removes the specified header. | public void | reset() Clear any content written to the buffer. | public void | sendError(int status, String message) Send an error response with the specified status and message. | void | setAllowChunking(boolean allowChunking) Set the chunking flag. | public void | setContentLength(int length) Set the content length (in bytes) for this Response. | public void | setStatus(int status) Set the HTTP status to be returned with this response. |
allowChunking | protected boolean allowChunking(Code) | | True if chunking is allowed.
|
info | final protected static String info(Code) | | Descriptive information about this Response implementation.
|
createOutputStream | public ServletOutputStream createOutputStream() throws IOException(Code) | | Create and return a ServletOutputStream to write the content
associated with this Response.
exception: IOException - if an input/output error occurs |
finishResponse | public void finishResponse() throws IOException(Code) | | Perform whatever actions are required to flush and close the output
stream or writer, in a single operation.
exception: IOException - if an input/output error occurs |
getInfo | public String getInfo()(Code) | | Return descriptive information about this Response implementation and
the corresponding version number, in the format
<description>/<version> .
|
getProtocol | protected String getProtocol()(Code) | | Return the HTTP protocol version implemented by this response
object.
The "HTTP/1.1" string. |
isChunkingAllowed | public boolean isChunkingAllowed()(Code) | | True if chunking is allowed.
|
isCloseConnection | public boolean isCloseConnection()(Code) | | Tests is the connection will be closed after the processing of the
request.
|
isStreamInitialized | public boolean isStreamInitialized()(Code) | | Has stream been created ?
|
recycle | public void recycle()(Code) | | Release all object references, and initialize instance variables, in
preparation for reuse of this object.
|
removeHeader | public void removeHeader(String name, String value)(Code) | | Removes the specified header.
Parameters: name - Name of the header to remove Parameters: value - Value to remove |
reset | public void reset()(Code) | | Clear any content written to the buffer. In addition, all cookies
and headers are cleared, and the status is reset.
exception: IllegalStateException - if this response has alreadybeen committed |
sendError | public void sendError(int status, String message) throws IOException(Code) | | Send an error response with the specified status and message.
Parameters: status - HTTP status code to send Parameters: message - Corresponding message to send exception: IllegalStateException - if this response hasalready been committed exception: IOException - if an input/output error occurs |
setAllowChunking | void setAllowChunking(boolean allowChunking)(Code) | | Set the chunking flag.
|
setContentLength | public void setContentLength(int length)(Code) | | Set the content length (in bytes) for this Response.
Parameters: length - The new content length |
setStatus | public void setStatus(int status)(Code) | | Set the HTTP status to be returned with this response.
Parameters: status - The new HTTP status |
|
|