|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.coyote.Response
public final class Response
Response object.
Field Summary | |
---|---|
protected java.lang.String |
characterEncoding
|
protected boolean |
charsetSet
Has the charset been explicitly set. |
protected boolean |
commited
Committed flag. |
protected java.lang.String |
contentLanguage
|
protected long |
contentLength
|
protected java.lang.String |
contentType
HTTP specific fields. |
protected java.lang.Exception |
errorException
Holds request error exception. |
protected java.lang.String |
errorURI
Request error URI. |
protected MimeHeaders |
headers
Response headers. |
ActionHook |
hook
Action hook. |
protected java.lang.String |
message
Status message. |
protected java.lang.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,
java.lang.Object param)
|
void |
addHeader(java.lang.String name,
java.lang.String value)
|
boolean |
containsHeader(java.lang.String name)
Warning: This method always returns false |
void |
doWrite(ByteChunk chunk)
Write a chunk of bytes. |
void |
finish()
|
long |
getBytesWritten()
|
java.lang.String |
getCharacterEncoding()
|
java.lang.String |
getContentLanguage()
Return the content language. |
int |
getContentLength()
|
long |
getContentLengthLong()
|
java.lang.String |
getContentType()
|
java.lang.Exception |
getErrorException()
Get the Exception that occurred during request processing. |
java.lang.String |
getErrorURI()
Get the request URI that caused the original error. |
ActionHook |
getHook()
|
java.util.Locale |
getLocale()
|
java.lang.String |
getMessage()
Get the status message. |
MimeHeaders |
getMimeHeaders()
|
java.lang.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(java.lang.String charset)
|
void |
setCommitted(boolean v)
|
void |
setContentLength(int contentLength)
|
void |
setContentLength(long contentLength)
|
void |
setContentType(java.lang.String type)
Sets the content type. |
void |
setErrorException(java.lang.Exception ex)
Set the error Exception that occurred during request processing. |
void |
setErrorURI(java.lang.String uri)
Set request URI that caused an error during request processing. |
void |
setHeader(java.lang.String name,
java.lang.String value)
|
void |
setHook(ActionHook hook)
|
void |
setLocale(java.util.Locale locale)
Called explicitely by user to set the Content-Language and the default encoding |
void |
setMessage(java.lang.String message)
Set the status message. |
void |
setNote(int pos,
java.lang.Object value)
|
void |
setOutputBuffer(OutputBuffer outputBuffer)
|
void |
setRequest(Request req)
|
void |
setStatus(int status)
Set the response status |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int status
protected java.lang.String message
protected MimeHeaders headers
protected OutputBuffer outputBuffer
protected java.lang.Object[] notes
protected boolean commited
public ActionHook hook
protected java.lang.String contentType
protected java.lang.String contentLanguage
protected java.lang.String characterEncoding
protected long contentLength
protected java.lang.Exception errorException
protected boolean charsetSet
protected java.lang.String errorURI
protected Request req
Constructor Detail |
---|
public Response()
Method Detail |
---|
public Request getRequest()
public void setRequest(Request req)
public OutputBuffer getOutputBuffer()
public void setOutputBuffer(OutputBuffer outputBuffer)
public MimeHeaders getMimeHeaders()
public ActionHook getHook()
public void setHook(ActionHook hook)
public final void setNote(int pos, java.lang.Object value)
public final java.lang.Object getNote(int pos)
public void action(ActionCode actionCode, java.lang.Object param)
public int getStatus()
public void setStatus(int status)
public java.lang.String getMessage()
public void setMessage(java.lang.String message)
public boolean isCommitted()
public void setCommitted(boolean v)
public void setErrorException(java.lang.Exception ex)
public java.lang.Exception getErrorException()
public boolean isExceptionPresent()
public void setErrorURI(java.lang.String uri)
public java.lang.String getErrorURI()
public void reset() throws java.lang.IllegalStateException
java.lang.IllegalStateException
public void finish() throws java.io.IOException
java.io.IOException
public void acknowledge() throws java.io.IOException
java.io.IOException
public boolean containsHeader(java.lang.String name)
false for Content-Type
and Content-Length.
public void setHeader(java.lang.String name, java.lang.String value)
public void addHeader(java.lang.String name, java.lang.String value)
public void sendHeaders() throws java.io.IOException
java.io.IOException
public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
public java.lang.String getContentLanguage()
public void setCharacterEncoding(java.lang.String charset)
public java.lang.String getCharacterEncoding()
public void setContentType(java.lang.String type)
type
- the content typepublic java.lang.String getContentType()
public void setContentLength(int contentLength)
public void setContentLength(long contentLength)
public int getContentLength()
public long getContentLengthLong()
public void doWrite(ByteChunk chunk) throws java.io.IOException
java.io.IOException
public void recycle()
public long getBytesWritten()
public void setBytesWritten(long bytesWritten)
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |