|
Apache Tomcat 7.0.28 | ||||||||
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 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 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(boolean flush)
Bytes written to socket - i.e. after compression, chunking, etc. |
String |
getCharacterEncoding()
|
String |
getContentLanguage()
Return the content language. |
int |
getContentLength()
|
long |
getContentLengthLong()
|
String |
getContentType()
|
long |
getContentWritten()
Bytes written by application - i.e. before compression, chunking, etc. |
Exception |
getErrorException()
Get the Exception that occurred during request processing. |
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 |
setCharacterEncoding(String charset)
|
void |
setCommitted(boolean v)
|
void |
setContentLength(int contentLength)
|
void |
setContentLength(long contentLength)
|
void |
setContentType(String type)
Sets the content type. |
void |
setContentTypeNoCharset(String type)
|
void |
setErrorException(Exception ex)
Set the error Exception that occurred during request processing. |
void |
setHeader(String name,
String value)
|
void |
setHook(ActionHook hook)
|
void |
setLocale(Locale locale)
Called explicitly 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int status
protected String message
protected MimeHeaders headers
protected OutputBuffer outputBuffer
protected Object[] notes
protected boolean commited
public ActionHook hook
protected String contentType
protected String contentLanguage
protected String characterEncoding
protected long contentLength
protected Exception errorException
protected boolean charsetSet
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, Object value)
public final Object getNote(int pos)
public void action(ActionCode actionCode, Object param)
public int getStatus()
public void setStatus(int status)
public String getMessage()
public void setMessage(String message)
public boolean isCommitted()
public void setCommitted(boolean v)
public void setErrorException(Exception ex)
public Exception getErrorException()
public boolean isExceptionPresent()
public void reset() throws IllegalStateException
IllegalStateException
public void finish()
public void acknowledge()
public boolean containsHeader(String name)
false for Content-Type
and Content-Length.
public void setHeader(String name, String value)
public void addHeader(String name, String value)
public void sendHeaders()
public Locale getLocale()
public void setLocale(Locale locale)
public String getContentLanguage()
public void setCharacterEncoding(String charset)
public String getCharacterEncoding()
public void setContentType(String type)
type
- the content typepublic void setContentTypeNoCharset(String type)
public String getContentType()
public void setContentLength(int contentLength)
public void setContentLength(long contentLength)
public int getContentLength()
public long getContentLengthLong()
public void doWrite(ByteChunk chunk) throws IOException
IOException
public void recycle()
public long getContentWritten()
public long getBytesWritten(boolean flush)
|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |