|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WebResponse
A response from a web server.
| Method Summary | |
|---|---|
byte[] |
getContentAsBytes()
Returns the response content as a byte array. |
java.io.InputStream |
getContentAsStream()
Returns the response content as an input stream. |
java.lang.String |
getContentAsString()
Returns the response content as a string, using the charset/encoding specified in the server response. |
java.lang.String |
getContentAsString(java.lang.String encoding)
Returns the response content as a string, using the specified charset/encoding, rather than the charset/encoding specified in the server response. |
java.lang.String |
getContentCharset()
Returns the content charset for this response, even if no charset was specified explicitly. |
java.lang.String |
getContentCharSet()
Deprecated. as of 2.6, please use getContentCharset() |
java.lang.String |
getContentCharsetOrNull()
Returns the content charset specified explicitly in the header or in the content, or null if none was specified. |
java.lang.String |
getContentType()
Returns the content type returned from the server, e.g. |
long |
getLoadTime()
Returns the time it took to load this web response, in milliseconds. |
HttpMethod |
getRequestMethod()
Deprecated. as of 2.6, please use getRequestSettings().getHttpMethod() |
WebRequestSettings |
getRequestSettings()
Returns the request settings used to load this response. |
java.net.URL |
getRequestUrl()
Deprecated. as of 2.6, please use getRequestSettings().getUrl() |
java.util.List<org.apache.commons.httpclient.NameValuePair> |
getResponseHeaders()
Returns the response headers as a list of NameValuePairs. |
java.lang.String |
getResponseHeaderValue(java.lang.String headerName)
Returns the value of the specified response header. |
int |
getStatusCode()
Returns the status code that was returned by the server. |
java.lang.String |
getStatusMessage()
Returns the status message that was returned from the server. |
java.net.URL |
getUrl()
Synonym for getRequestUrl() |
| Method Detail |
|---|
WebRequestSettings getRequestSettings()
@Deprecated HttpMethod getRequestMethod()
getRequestSettings().getHttpMethod()
@Deprecated java.net.URL getRequestUrl()
getRequestSettings().getUrl()
java.net.URL getUrl()
getRequestUrl()
java.util.List<org.apache.commons.httpclient.NameValuePair> getResponseHeaders()
NameValuePairs.
NameValuePairsjava.lang.String getResponseHeaderValue(java.lang.String headerName)
headerName - the name of the header whose value is to be returned
int getStatusCode()
java.lang.String getStatusMessage()
java.lang.String getContentType()
@Deprecated java.lang.String getContentCharSet()
getContentCharset()
java.lang.String getContentCharsetOrNull()
java.lang.String getContentCharset()
TextUtil.DEFAULT_CHARSET.
java.lang.String getContentAsString()
java.lang.String getContentAsString(java.lang.String encoding)
encoding - the charset/encoding to use to convert the response content into a string
java.io.InputStream getContentAsStream()
throws java.io.IOException
java.io.IOException - if an IO problem occursbyte[] getContentAsBytes()
long getLoadTime()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||