|
||||||||||
| 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,
String statusMessage,
List<NameValuePair> responseHeaders)
Constructs with a raw byte[] (mostly for testing). |
|
WebResponseData(DownloadedContent responseBody,
int statusCode,
String statusMessage,
List<NameValuePair> responseHeaders)
Constructor. |
|
WebResponseData(InputStream bodyStream,
int statusCode,
String statusMessage,
List<NameValuePair> responseHeaders)
Deprecated. As of HtmlUnit-2.8. |
protected |
WebResponseData(int statusCode,
String statusMessage,
List<NameValuePair> responseHeaders)
Constructs without data stream for subclasses that override getBody(). |
| Method Summary | |
|---|---|
byte[] |
getBody()
Returns the response body. |
InputStream |
getInputStream()
Returns a new InputStream allowing to read the downloaded content. |
List<NameValuePair> |
getResponseHeaders()
|
int |
getStatusCode()
|
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,
String statusMessage,
List<NameValuePair> responseHeaders)
throws IOException
body - Body of this responsestatusCode - Status code from the serverstatusMessage - Status message from the serverresponseHeaders - Headers in this response
IOException - on stream errors
@Deprecated
public WebResponseData(InputStream bodyStream,
int statusCode,
String statusMessage,
List<NameValuePair> responseHeaders)
throws IOException
bodyStream - Stream of this response's bodystatusCode - Status code from the serverstatusMessage - Status message from the serverresponseHeaders - Headers in this response
IOException - on stream errors
protected WebResponseData(int statusCode,
String statusMessage,
List<NameValuePair> responseHeaders)
throws IOException
statusCode - Status code from the serverstatusMessage - Status message from the serverresponseHeaders - Headers in this response
IOException - on stream errors
public WebResponseData(DownloadedContent responseBody,
int statusCode,
String statusMessage,
List<NameValuePair> responseHeaders)
throws IOException
responseBody - the downloaded response bodystatusCode - Status code from the serverstatusMessage - Status message from the serverresponseHeaders - Headers in this response
IOException - on stream errors| Method Detail |
|---|
public byte[] getBody()
public InputStream getInputStream()
InputStream allowing to read the downloaded content.
public List<NameValuePair> getResponseHeaders()
public int getStatusCode()
public String getStatusMessage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||