public static class WebProxy.HttpResponse extends Object implements Response
Modifier and Type | Method and 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.
|
public OutputStream getOutputStream()
getOutputStream
in interface Response
IOFailure
- if an outputstream can not be obtained (on invalidated response).public void setStatus(int statusCode)
public void setStatus(int statusCode, String reason)
public void addHeaderField(String name, String value)
addHeaderField
in interface Response
name
- Name of the header, e.g. Last-Modified-Datevalue
- The value of the headerCopyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.