Interface ContentTypeConverter<S,T>
-
- Type Parameters:
S- The expected source typeT- The output type
- All Known Implementing Classes:
BlobToInputStreamConverter,ByteArrayToInputStreamConverter,ByteArrayToJsonNodeConverter,ByteArrayToStringConverter,ChainedConverter,Dom4JToByteArrayConverter,InputStreamToByteArrayConverter,InputStreamToDom4jConverter,InputStreamToXomConverter,JsonNodeToByteArrayConverter,StringToByteArrayConverter,XomToStringConverter
public interface ContentTypeConverter<S,T>Interface describing a mechanism that converts the data type of IntermediateRepresentations of SerializedObjects for Upcasters. Different upcasters may require different data type (e.g.byte[]orInputStream), or may produce a different data type than they consume.- Since:
- 2.0
- Author:
- Allard Buijze
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tconvert(S original)Converts the given object into another.Class<S>expectedSourceType()The expected type of input data.Class<T>targetType()The returned type of IntermediateRepresentation
-
-
-
Method Detail
-
expectedSourceType
Class<S> expectedSourceType()
The expected type of input data.- Returns:
- the expected data format in IntermediateRepresentation
-
targetType
Class<T> targetType()
The returned type of IntermediateRepresentation- Returns:
- the output data format in IntermediateRepresentation
-
convert
T convert(S original)
Converts the given object into another. Typically, these values are contained by aSerializedObjectinstance.- Parameters:
original- the value to convert- Returns:
- the converted value
-
-