|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Converter
Arbiter for converting objects to and from their representation in HTTP.
Method Summary | |
---|---|
Object |
fromBody(TypedInput body,
Type type)
Convert an HTTP response body to a concrete object of the specified type. |
TypedOutput |
toBody(Object object)
Convert and object to an appropriate representation for HTTP transport. |
Method Detail |
---|
Object fromBody(TypedInput body, Type type) throws ConversionException
body
- HTTP response body.type
- Target object type.
type
which will be cast by the caller.
ConversionException
- if conversion was unable to complete. This will trigger a call to
Callback.failure(retrofit.RetrofitError)
or throw a
RetrofitError
. The exception message should report all necessary information
about its cause as the response body will be set to null
.TypedOutput toBody(Object object)
object
- Object instance to convert.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |