|
Spring for Android | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface GenericHttpMessageConverter<T>
A specialization of HttpMessageConverter that can convert an HTTP
request into a target object of a specified generic type.
ParameterizedTypeReference| Method Summary | |
|---|---|
boolean |
canRead(java.lang.reflect.Type type,
java.lang.Class<?> contextClass,
MediaType mediaType)
Indicates whether the given type can be read by this converter. |
T |
read(java.lang.reflect.Type type,
java.lang.Class<?> contextClass,
HttpInputMessage inputMessage)
Read an object of the given type form the given input message, and returns it. |
| Methods inherited from interface org.springframework.http.converter.HttpMessageConverter |
|---|
canRead, canWrite, getSupportedMediaTypes, read, write |
| Method Detail |
|---|
boolean canRead(java.lang.reflect.Type type,
java.lang.Class<?> contextClass,
MediaType mediaType)
type - the type to test for readabilitycontextClass - a context class for the target type, for example a class
in which the target type appears in a method signature, can be nullmediaType - the media type to read, can be null if not specified.
Typically the value of a Content-Type header.
true if readable; false otherwise
T read(java.lang.reflect.Type type,
java.lang.Class<?> contextClass,
HttpInputMessage inputMessage)
throws java.io.IOException,
HttpMessageNotReadableException
type - the type of object to return. This type must have previously
been passed to the canRead method of this interface,
which must have returned true.contextClass - a context class for the target type, for example a class
in which the target type appears in a method signature, can be nullinputMessage - the HTTP input message to read from
java.io.IOException - in case of I/O errors
HttpMessageNotReadableException - in case of conversion errors
|
Spring for Android | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||