Class KeyValueMarshaler


  • public final class KeyValueMarshaler
    extends MarshalerWithSize
    A Marshaler of key value pairs.

    This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

    • Field Detail

      • EMPTY_BYTES

        private static final byte[] EMPTY_BYTES
      • keyUtf8

        private final byte[] keyUtf8
    • Constructor Detail

      • KeyValueMarshaler

        private KeyValueMarshaler​(byte[] keyUtf8,
                                  Marshaler value)
    • Method Detail

      • createForKeyValue

        public static KeyValueMarshaler createForKeyValue​(KeyValue keyValue)
        Returns Marshaler for the given KeyValue.
      • createForAttributes

        public static KeyValueMarshaler[] createForAttributes​(Attributes attributes)
        Returns Marshalers for the given Attributes.
      • writeTo

        public void writeTo​(Serializer output)
                     throws java.io.IOException
        Specified by:
        writeTo in class Marshaler
        Throws:
        java.io.IOException
      • calculateSize

        private static int calculateSize​(byte[] keyUtf8,
                                         Marshaler value)