public class ResponseObject extends Object
| Constructor and description |
|---|
ResponseObject
() |
ResponseObject
(String responseText) |
| Type | Name and description |
|---|---|
HttpBodyContent |
getBodyContent() |
String |
getContentCharset()@return Returns the Charset specified in the Content-Type of this response or the "UTF-8" charset as a default. |
long |
getContentDownloadTime() |
String |
getContentType()Get the content type |
long |
getElapsedTime() |
Map<String, List<String>> |
getHeaderFields()Get the header fields as a Map |
String |
getResponseBodyContent()Get the response body content as a String |
long |
getResponseBodySize() |
long |
getResponseHeaderSize()Returns headers size (byte) as long value of the response. |
long |
getResponseSize()Returns size (byte) as long value of the response. |
String |
getResponseText()Get the raw response text |
int |
getStatusCode()Get the status code |
long |
getWaitingTime() |
boolean |
isJsonContentType()Check if the content type of this response is json |
boolean |
isTextContentType()Check if the content type of this response is raw text |
boolean |
isXmlContentType()Check if the content type of this response is xml |
void |
setBodyContent(HttpBodyContent bodyContent) |
void |
setContentCharset(String contentCharset) |
void |
setContentDownloadTime(long contentDownloadTime) |
void |
setContentType(String contentType)Set the content type |
void |
setHeaderFields(Map<String, List<String>> headerFields)Set the header fields |
void |
setResponseBodySize(long reponseBodySize)Returns body size (byte) as long value of the response. |
void |
setResponseHeaderSize(long reponseHeaderSize) |
void |
setResponseText(String responseText)Set the raw response text |
void |
setStatusCode(int statusCode)Set the status code |
void |
setWaitingTime(long waitingTime) |
String |
toString() |
Get the content type
Get the header fields as a Map
Get the response body content as a String
Returns headers size (byte) as long value of the response.
Returns size (byte) as long value of the response. Response size = Header size + Body size
Get the raw response text
Get the status code
Check if the content type of this response is json
Check if the content type of this response is raw text
Check if the content type of this response is xml
Set the content type
contentType - the new content typeSet the header fields
headerFields - the new header fields as a MapReturns body size (byte) as long value of the response.
Set the raw response text
responseText - the new raw response textSet the status code
statusCode - the status code