Package dk.netarkivet.viewerproxy
Class WebProxy.HttpResponse
- java.lang.Object
-
- dk.netarkivet.viewerproxy.WebProxy.HttpResponse
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHeaderField(String name, String value)
Add an HTTP header to the response.OutputStream
getOutputStream()
Getter for the data output stream.int
getStatus()
Get the HTTP status of this response.void
setStatus(int statusCode)
Setter for the status code (e.g.void
setStatus(int statusCode, String reason)
Set status code and explanatory text string describing the status.
-
-
-
Method Detail
-
getOutputStream
public OutputStream getOutputStream()
Getter for the data output stream.- Specified by:
getOutputStream
in interfaceResponse
- Returns:
- An open output stream.
- Throws:
IOFailure
- if an outputstream can not be obtained (on invalidated response).
-
setStatus
public void setStatus(int statusCode)
Setter for the status code (e.g. 200, 404)
-
setStatus
public void setStatus(int statusCode, String reason)
Set status code and explanatory text string describing the status.
-
addHeaderField
public void addHeaderField(String name, String value)
Add an HTTP header to the response.- Specified by:
addHeaderField
in interfaceResponse
- Parameters:
name
- Name of the header, e.g. Last-Modified-Datevalue
- The value of the header
-
-