|
|||||
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 responseHeaders)
Construct with a raw byte[] (mostly for testing) |
|
WebResponseData(java.io.InputStream bodyStream,
int statusCode,
java.lang.String statusMessage,
java.util.List responseHeaders)
Construct with a data stream to minimize copying of the entire body. |
Method Summary | |
---|---|
byte[] |
getBody()
Return the response body. |
java.util.List |
getResponseHeaders()
|
int |
getStatusCode()
|
java.lang.String |
getStatusMessage()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebResponseData(byte[] body, int statusCode, java.lang.String statusMessage, java.util.List responseHeaders)
body
- Body of this responsestatusCode
- Status code from the serverstatusMessage
- Status message from the serverresponseHeaders
- Headers in this responsepublic WebResponseData(java.io.InputStream bodyStream, int statusCode, java.lang.String statusMessage, java.util.List 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 errorsMethod Detail |
---|
public byte[] getBody()
public java.util.List 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 |