Package org.rostore.client.mapper
Interface Mapper
- All Known Implementing Classes:
JsonMapper,NativeMapper,StringMapper
public interface Mapper
Provides serialization / deserialization for mapping of the underlying objects
-
Method Summary
Modifier and TypeMethodDescription<K,V> InputStream fromObject(V value, K key) Serialization functionThe content type of the input stream<K,V> V toObject(InputStream inputStream, Class<V> valueClass, K key) Deserialization function
-
Method Details
-
fromObject
Serialization function- Type Parameters:
K- the key typeV- the value type- Parameters:
value- the value objectkey- the key object- Returns:
- the serialized input stream
-
toObject
Deserialization function- Type Parameters:
K- the key typeV- the value type- Parameters:
inputStream- the input stream to deserializevalueClass- the class of the value objectkey- the key object- Returns:
- the deserialized value object
-
getContentType
ContentType getContentType()The content type of the input stream- Returns:
- the content type used in the header
-