|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HttpResponse
This interface takes care of HTTP Responses. It sends data back to the browser.
Method Summary | |
---|---|
void |
flushBuffer()
Flushes the output buffer to the client. |
String |
getContentType()
Gets the content type that will be sent to the browser. |
String |
getHeader(String name)
Gets a header based on the name passed in |
OutputStream |
getOutputStream()
Gets the OutputStream to send data to the browser |
PrintWriter |
getPrintWriter()
Gets the PrintWriter to send data to the browser |
int |
getStatusCode()
Gets the response status code that will be sent to the browser |
void |
setContentType(String type)
Sets the content type to be sent back to the browser. |
void |
setHeader(String name,
String value)
Sets a header to be sent back to the browser |
void |
setStatusCode(int code)
Sets the HTTP response status code to be sent to the browser. |
void |
setStatusMessage(String responseString)
Sets the response string to be sent to the browser |
Method Detail |
---|
String getHeader(String name)
name
- the header name
void setHeader(String name, String value)
name
- the header namevalue
- the header valuePrintWriter getPrintWriter() throws IOException
IOException
OutputStream getOutputStream()
String getContentType()
void setContentType(String type)
type
- the type to be sent to the browser (i.e. "text/html")int getStatusCode()
void setStatusCode(int code)
code
- the status code to be sent to the browservoid setStatusMessage(String responseString)
responseString
- the response stringvoid flushBuffer() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |