|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.viewerproxy.WebProxy.HttpResponse
public static class WebProxy.HttpResponse
A wrapper around the Jetty HttpResponse, giving the simple Response interface used in our URIResolvers. Also Collects and remembers status code for a response.
Method Summary | |
---|---|
void |
addHeaderField(java.lang.String name,
java.lang.String value)
Add an HTTP header to the response. |
java.io.OutputStream |
getOutputStream()
Getter for the data output stream. |
int |
getStatus()
Get the HTTP status of this repsonse. |
void |
setStatus(int statusCode)
Setter for the status code (e.g. |
void |
setStatus(int statusCode,
java.lang.String reason)
Set status code and explanatory text string describing the status. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.io.OutputStream getOutputStream()
getOutputStream
in interface Response
IOFailure
- if an outprutstream can not be obtained (on
invalidated response).public void setStatus(int statusCode)
setStatus
in interface Response
statusCode
- An HTTP status code.public void setStatus(int statusCode, java.lang.String reason)
setStatus
in interface Response
statusCode
- should be valid http status ie. 200, 404,reason
- text string explaining status ie. OK, not found,public void addHeaderField(java.lang.String name, java.lang.String value)
addHeaderField
in interface Response
name
- Name of the header, e.g. Last-Modified-Datevalue
- The value of the headerpublic int getStatus()
getStatus
in interface Response
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |