- Type Parameters:
From
- the encoded typeTo
- the decoded type
- All Known Subinterfaces:
CompoundDecoder<From,
,To> Converter<A,
,B> MediaTypeConverter<From>
,ObjectConverter<From>
,PrimitiveDecoder<From>
,ReactiveConverter<A,
,B> ReactiveDecoder<From,
,To> SplittableDecoder<From,
,To> SplittablePrimitiveDecoder<From>
- All Known Implementing Classes:
ByteBufConverter
,CompositeConverter
,CompositeDecoder
,JacksonByteBufConverter
,JacksonStringConverter
,JsonByteBufMediaTypeConverter
,JsonStringMediaTypeConverter
,NdJsonByteBufMediaTypeConverter
,NdJsonStringMediaTypeConverter
,ObjectDecoder
,ParameterConverter
,StringCompositeConverter
,StringConverter
,TextByteBufMediaTypeConverter
,TextStringMediaTypeConverter
public interface Decoder<From,To>
A decoder is used to decode an object into another object.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
-
Method Summary
-
Method Details
-
decode
Decodes the specified value to an object whose type is represented by the specified class.
- Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the object to decodetype
- the class of the decoded object- Returns:
- a decoded object
- Throws:
ConverterException
- if there was an error decoding the value
-
decode
Decodes the specified value to an object of the specified type.
- Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the object to decodetype
- the type of the decoded object- Returns:
- a decoded object
- Throws:
ConverterException
- if there was an error decoding the value
-