Interface Transcoder

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  Transcoder.EncodedValue
      Represents the tuple of encoded value and flags to be used on the wire.
    • Method Detail

      • encode

        Transcoder.EncodedValue encode​(Object input)
        Encodes the given input into the wire representation based on the data format.
        Parameters:
        input - the input object to encode.
        Returns:
        the encoded wire representation of the payload.
      • decode

        <T> T decode​(Class<T> target,
                     byte[] input,
                     int flags)
        Decodes the wire representation into the entity based on the data format.
        Type Parameters:
        T - the generic type used for the decoding target.
        Parameters:
        target - the target type to decode.
        input - the wire representation to decode.
        flags - the flags on the wire
        Returns:
        the decoded entity.
      • decode

        default <T> T decode​(TypeRef<T> target,
                             byte[] input,
                             int flags)
        Decodes the wire representation into the entity based on the data format.
        Type Parameters:
        T - the generic type used for the decoding target.
        Parameters:
        target - the target type to decode.
        input - the wire representation to decode.
        flags - the flags on the wire
        Returns:
        the decoded entity.