Encoding

public enum Encoding

A description of the Value format, allowing zenoh to know how to encode/decode the value to/from a bytes buffer.

Enum Constants

FLOAT

public static final Encoding FLOAT

INT

public static final Encoding INT

JSON

public static final Encoding JSON

The value is a JSON structure in an UTF-8 string.

PROPERTIES

public static final Encoding PROPERTIES

The value if a list of keys/values, encoded as an UTF-8 string. The keys/values are separated by ‘;’ character, and each key is separated from its associated value (if any) with a ‘=’ character.

RAW

public static final Encoding RAW

The value has a RAW encoding (i.e. it’s a bytes buffer).

STRING

public static final Encoding STRING

The value is an UTF-8 string.

Methods

fromFlag

protected static Encoding fromFlag(short flag)

getDecoder

public Value.Decoder getDecoder()

Returns the Value.Decoder for this encoding.

Returns:the decoder.

getFlag

public short getFlag()

Returns the numeric flag corresponding to the encoding, for usage with zenoh-net.

Returns:the encoding flag.