FlatBuffers
An open source project by FPL.
com.google.flatbuffers.FlexBuffers Class Reference

This class can be used to parse FlexBuffer messages. More...

Detailed Description

This class can be used to parse FlexBuffer messages.

For generating FlexBuffer messages, use FlexBuffersBuilder.

Example of usage:

ReadBuf bb = ... // load message from file or network
FlexBuffers.Reference r = FlexBuffers.getRoot(bb); // Reads the root element
FlexBuffers.Map map = r.asMap(); // We assumed root object is a map
System.out.println(map.get("name").asString()); // prints element with key "name"

Classes

class  Blob
 Represents a array of bytes element in the buffer. More...
 
class  FlexBufferException
 
class  Key
 Represents a key element in the buffer. More...
 
class  KeyVector
 Represent a vector of keys in a map. More...
 
class  Map
 Map object representing a set of key-value pairs. More...
 
class  Reference
 Represents an generic element in the buffer. More...
 
class  TypedVector
 Object that represents a set of elements with the same type. More...
 
class  Unsigned
 
class  Vector
 Object that represents a set of elements in the buffer. More...
 

Static Public Member Functions

static Reference getRoot (ByteBuffer buffer)
 Reads a FlexBuffer message in ReadBuf and returns Reference to the root element. More...
 
static Reference getRoot (ReadBuf buffer)
 Reads a FlexBuffer message in ReadBuf and returns Reference to the root element. More...
 

Static Public Attributes

FLATBUFFERS_INTERNAL static final int FBT_BLOB = 25
 Represent a blob type.
 
static final int FBT_BOOL = 26
 Represent a boolean type.
 
static final int FBT_FLOAT = 3
 Represent a float type.
 
static final int FBT_INDIRECT_FLOAT = 8
 Represent a indirect float type.
 
static final int FBT_INDIRECT_INT = 6
 Represent a indirect signed integer type.
 
static final int FBT_INDIRECT_UINT = 7
 Represent a indirect unsigned integer type.
 
static final int FBT_INT = 1
 Represent a signed integer type.
 
static final int FBT_KEY = 4
 Represent a key to a map type.
 
static final int FBT_MAP = 9
 Represent a map type.
 
static final int FBT_NULL = 0
 Represent a null type.
 
static final int FBT_STRING = 5
 Represent a string type.
 
static final int FBT_UINT = 2
 Represent a unsigned type.
 
static final int FBT_VECTOR = 10
 Represent a vector type.
 
static final int FBT_VECTOR_BOOL = 36
 Represent a vector of booleans type.
 
static final int FBT_VECTOR_FLOAT = 13
 Represent a vector of floats type.
 
static final int FBT_VECTOR_INT = 11
 Represent a vector of signed integers type.
 
static final int FBT_VECTOR_KEY = 14
 Represent a vector of keys type.
 
static final int FBT_VECTOR_STRING_DEPRECATED = 15
 Represent a vector of strings type.
 
static final int FBT_VECTOR_UINT = 12
 Represent a vector of unsigned integers type.
 

Member Function Documentation

◆ getRoot() [1/2]

static Reference com.google.flatbuffers.FlexBuffers.getRoot ( ByteBuffer  buffer)
inlinestatic

Reads a FlexBuffer message in ReadBuf and returns Reference to the root element.

Parameters
bufferReadBuf containing FlexBuffer message
Returns
Reference to the root object

◆ getRoot() [2/2]

static Reference com.google.flatbuffers.FlexBuffers.getRoot ( ReadBuf  buffer)
inlinestatic

Reads a FlexBuffer message in ReadBuf and returns Reference to the root element.

Parameters
bufferReadBuf containing FlexBuffer message
Returns
Reference to the root object

The documentation for this class was generated from the following file: