|
Spring for Android | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.web.client.HttpMessageConverterExtractor<T>
public class HttpMessageConverterExtractor<T>
Response extractor that uses the given entity converters to convert the response
into a type T
.
RestTemplate
Constructor Summary | |
---|---|
HttpMessageConverterExtractor(java.lang.Class<T> responseType,
java.util.List<HttpMessageConverter<?>> messageConverters)
Creates a new instance of the HttpMessageConverterExtractor with the given response type and message
converters. |
Method Summary | |
---|---|
T |
extractData(ClientHttpResponse response)
Extract data from the given ClientHttpResponse and return it. |
protected boolean |
hasMessageBody(ClientHttpResponse response)
Indicates whether the given response has a message body. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpMessageConverterExtractor(java.lang.Class<T> responseType, java.util.List<HttpMessageConverter<?>> messageConverters)
HttpMessageConverterExtractor
with the given response type and message
converters. The given converters must support the response type.
Method Detail |
---|
public T extractData(ClientHttpResponse response) throws java.io.IOException
ResponseExtractor
ClientHttpResponse
and return it.
extractData
in interface ResponseExtractor<T>
response
- the HTTP response
java.io.IOException
- in case of I/O errorsprotected boolean hasMessageBody(ClientHttpResponse response) throws java.io.IOException
Default implementation returns false
for a response status of 204
or 304
, or a
Content-Length
of 0
.
response
- the response to check for a message body
true
if the response has a body, false
otherwise
java.io.IOException
- in case of I/O errors
|
Spring for Android | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |