Response object.
characterEncoding
protected String characterEncoding
charsetSet
protected boolean charsetSet
Has the charset been explicitly set.
commited
protected boolean commited
Committed flag.
contentLanguage
protected String contentLanguage
contentLength
protected int contentLength
contentType
protected String contentType
HTTP specific fields.
errorException
protected Exception errorException
Holds request error exception.
errorURI
protected String errorURI
Request error URI.
message
protected String message
Status message.
notes
protected Object[] notes
Notes.
outputBuffer
protected OutputBuffer outputBuffer
Associated output buffer.
status
protected int status
Status code.
acknowledge
public void acknowledge()
throws IOException
action
public void action(ActionCode actionCode,
Object param)
addHeader
public void addHeader(String name,
String value)
containsHeader
public boolean containsHeader(String name)
doWrite
public void doWrite(ByteChunk chunk)
throws IOException
Write a chunk of bytes.
finish
public void finish()
throws IOException
getBytesWritten
public long getBytesWritten()
getCharacterEncoding
public String getCharacterEncoding()
getContentLanguage
public String getContentLanguage()
Return the content language.
getContentLength
public int getContentLength()
getContentType
public String getContentType()
getErrorException
public Exception getErrorException()
Get the Exception that occurred during request
processing.
getErrorURI
public String getErrorURI()
Get the request URI that caused the original error.
getLocale
public Locale getLocale()
getMessage
public String getMessage()
Get the status message.
getNote
public final Object getNote(int pos)
getRequest
public Request getRequest()
getStatus
public int getStatus()
isCommitted
public boolean isCommitted()
isExceptionPresent
public boolean isExceptionPresent()
recycle
public void recycle()
reset
public void reset()
throws IllegalStateException
sendHeaders
public void sendHeaders()
throws IOException
Signal that we're done with the headers, and body will follow.
Any implementation needs to notify ContextManager, to allow
interceptors to fix headers.
setBytesWritten
public void setBytesWritten(long bytesWritten)
setCharacterEncoding
public void setCharacterEncoding(String charset)
setCommitted
public void setCommitted(boolean v)
setContentLength
public void setContentLength(int contentLength)
setContentType
public void setContentType(String type)
Sets the content type.
This method must preserve any response charset that may already have
been set via a call to response.setContentType(), response.setLocale(),
or response.setCharacterEncoding().
type
- the content type
setErrorException
public void setErrorException(Exception ex)
Set the error Exception that occurred during
request processing.
setErrorURI
public void setErrorURI(String uri)
Set request URI that caused an error during
request processing.
setHeader
public void setHeader(String name,
String value)
setLocale
public void setLocale(Locale locale)
Called explicitely by user to set the Content-Language and
the default encoding
setMessage
public void setMessage(String message)
Set the status message.
setNote
public final void setNote(int pos,
Object value)
setOutputBuffer
public void setOutputBuffer(OutputBuffer outputBuffer)
setRequest
public void setRequest(Request req)
setStatus
public void setStatus(int status)
Set the response status