Package io.protostuff

Class KvpInput

java.lang.Object
io.protostuff.KvpInput
All Implemented Interfaces:
Input

public final class KvpInput extends Object implements Input
An input for deserializing kvp-encoded messages. A kvp encoding is a binary encoding w/c contains a key-value sequence. On the wire, a serialized field (key-value) would look like: [key-len][key][value-len][value]

The keys and values are length-delimited (uint16 little endian).

Note that this encoding does not support nested messages. This encoding is mostly useful for headers w/c contain information about the content it carries (see http://projects.unbit.it/uwsgi/wiki/uwsgiProtocol).

  • Field Details

    • DEFAULT_BUFFER_SIZE

      static final int DEFAULT_BUFFER_SIZE
    • MAX_VALUE_SIZE

      static final int MAX_VALUE_SIZE
    • in

      final InputStream in
    • buffer

      final byte[] buffer
    • numeric

      final boolean numeric
    • offset

      int offset
    • limit

      int limit
  • Constructor Details

    • KvpInput

      public KvpInput(InputStream in, boolean numeric)
    • KvpInput

      public KvpInput(InputStream in, byte[] buffer, boolean numeric)
    • KvpInput

      public KvpInput(InputStream in, byte[] buffer, int offset, int limit, boolean numeric)
  • Method Details