public interface ILcdResponse
This interface must not be implemented by users. It may be subject to change.
Modifier and Type | Method and Description |
---|---|
void |
flush()
Flushes all pending data being written for this response.
|
OutputStream |
getOutputStream()
Returns an
OutputStream to which the server can write its
response. |
PrintWriter |
getWriter()
Returns a
PrintWriter to which the server can write its
response. |
void |
setContentLength(int aContentLength)
Specifies the size of the data returned by this response.
|
void |
setContentType(String aContentType)
Sets the content type (MIME type) of the response.
|
void |
setDateHeader(String aName,
long aValue)
Sets a response header with the given name and date-value.
|
void |
setHeader(String aName,
String aValue)
Sets a response header with the given name and value.
|
void |
setStatus(int aStatus)
Sets the HTTP status code for this response.
|
OutputStream getOutputStream() throws IOException
OutputStream
to which the server can write its
response.OutputStream
IOException
- if the output stream cannot be retrievedPrintWriter getWriter() throws IOException
PrintWriter
to which the server can write its
response.PrintWriter
IOException
- if the PrintWriter
cannot be created.void setContentType(String aContentType)
aContentType
- A MIME type, e.g. "text/xml".void setContentLength(int aContentLength)
aContentLength
- The data size of the response.void flush() throws IOException
IOException
- if the flush operation fails.void setDateHeader(String aName, long aValue)
aName
- the name of the header to setaValue
- the assigned date valuevoid setHeader(String aName, String aValue)
aName
- the header nameaValue
- the header valuevoid setStatus(int aStatus)
aStatus
- the HTTP status code for this response.