Interface Mapper

All Known Implementing Classes:
JsonMapper, NativeMapper

public interface Mapper
Provides serialization / deserialization for mapping of the underlying objects
  • Method Details

    • fromObject

      <K, V> InputStream fromObject(V value, K key)
      Serialization function
      Type Parameters:
      K - the key type
      V - the value type
      Parameters:
      value - the value object
      key - the key object
      Returns:
      the serialized input stream
    • toObject

      <K, V> V toObject(InputStream inputStream, Class<V> valueClass, K key)
      Deserialization function
      Type Parameters:
      K - the key type
      V - the value type
      Parameters:
      inputStream - the input stream to deserialize
      valueClass - the class of the value object
      key - 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