|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.WebResponseData
public class WebResponseData
Simple data object to simplify WebResponse creation.
Constructor Summary | |
---|---|
|
WebResponseData(byte[] body,
int statusCode,
java.lang.String statusMessage,
java.util.List<org.apache.commons.httpclient.NameValuePair> responseHeaders)
Constructs with a raw byte[] (mostly for testing). |
|
WebResponseData(DownloadedContent responseBody,
int statusCode,
java.lang.String statusMessage,
java.util.List<org.apache.commons.httpclient.NameValuePair> responseHeaders)
Constructor. |
|
WebResponseData(java.io.InputStream bodyStream,
int statusCode,
java.lang.String statusMessage,
java.util.List<org.apache.commons.httpclient.NameValuePair> responseHeaders)
Deprecated. As of HtmlUnit-2.8. |
protected |
WebResponseData(int statusCode,
java.lang.String statusMessage,
java.util.List<org.apache.commons.httpclient.NameValuePair> responseHeaders)
Constructs without data stream for subclasses that override getBody(). |
Method Summary | |
---|---|
byte[] |
getBody()
Returns the response body. |
java.io.InputStream |
getInputStream()
Returns a new InputStream allowing to read the downloaded content. |
java.util.List<org.apache.commons.httpclient.NameValuePair> |
getResponseHeaders()
|
int |
getStatusCode()
|
java.lang.String |
getStatusMessage()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebResponseData(byte[] body, int statusCode, java.lang.String statusMessage, java.util.List<org.apache.commons.httpclient.NameValuePair> responseHeaders)
body
- Body of this responsestatusCode
- Status code from the serverstatusMessage
- Status message from the serverresponseHeaders
- Headers in this response
java.io.IOException
- on stream errors@Deprecated public WebResponseData(java.io.InputStream bodyStream, int statusCode, java.lang.String statusMessage, java.util.List<org.apache.commons.httpclient.NameValuePair> responseHeaders) throws java.io.IOException
bodyStream
- Stream of this response's bodystatusCode
- Status code from the serverstatusMessage
- Status message from the serverresponseHeaders
- Headers in this response
java.io.IOException
- on stream errorsprotected WebResponseData(int statusCode, java.lang.String statusMessage, java.util.List<org.apache.commons.httpclient.NameValuePair> responseHeaders) throws java.io.IOException
statusCode
- Status code from the serverstatusMessage
- Status message from the serverresponseHeaders
- Headers in this response
java.io.IOException
- on stream errorspublic WebResponseData(DownloadedContent responseBody, int statusCode, java.lang.String statusMessage, java.util.List<org.apache.commons.httpclient.NameValuePair> responseHeaders)
responseBody
- the downloaded response bodystatusCode
- Status code from the serverstatusMessage
- Status message from the serverresponseHeaders
- Headers in this response
java.io.IOException
- on stream errorsMethod Detail |
---|
public byte[] getBody()
public java.io.InputStream getInputStream()
InputStream
allowing to read the downloaded content.
public java.util.List<org.apache.commons.httpclient.NameValuePair> getResponseHeaders()
public int getStatusCode()
public java.lang.String getStatusMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |