public class Table extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ByteBuffer |
bb
The underlying ByteBuffer to hold the data of the Table.
|
protected int |
bb_pos
Used to hold the position of the `bb` buffer.
|
| Constructor and Description |
|---|
Table() |
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
__has_identifier(ByteBuffer bb,
String ident)
Check if a
ByteBuffer contains a file identifier. |
protected int |
__indirect(int offset)
Retrieve a relative offset.
|
protected int |
__offset(int vtable_offset)
Look up a field in the vtable.
|
protected String |
__string(int offset)
Create a Java `String` from UTF-8 data stored inside the FlatBuffer.
|
protected Table |
__union(Table t,
int offset)
Initialize any Table-derived type to point to the union at the given `offset`.
|
protected ByteBuffer |
__vector_as_bytebuffer(int vector_offset,
int elem_size)
Get a whole vector as a ByteBuffer.
|
protected int |
__vector_len(int offset)
Get the length of a vector.
|
protected int |
__vector(int offset)
Get the start data of a vector.
|
ByteBuffer |
getByteBuffer()
Get the underlying ByteBuffer.
|
protected int bb_pos
protected ByteBuffer bb
public ByteBuffer getByteBuffer()
protected int __offset(int vtable_offset)
vtable_offset - An `int` offset to the vtable in the Table's ByteBuffer.protected int __indirect(int offset)
offset - An `int` index into the Table's ByteBuffer containing the relative offset.protected String __string(int offset)
offset - An `int` index into the Table's ByteBuffer.protected int __vector_len(int offset)
offset - An `int` index into the Table's ByteBuffer.protected int __vector(int offset)
offset - An `int` index into the Table's ByteBuffer.protected ByteBuffer __vector_as_bytebuffer(int vector_offset, int elem_size)
ByteBuffer object,
but does not actually copy the data, it still refers to the same bytes
as the original ByteBuffer. Also useful with nested FlatBuffers, etc.vector_offset - The position of the vector in the byte bufferelem_size - The size of each element in the arrayByteBuffer for the arrayprotected Table __union(Table t, int offset)
t - A `Table`-derived type that should point to the union at `offset`.offset - An `int` index into the Table's ByteBuffer.protected static boolean __has_identifier(ByteBuffer bb, String ident)
ByteBuffer contains a file identifier.bb - A ByteBuffer to check if it contains the identifier
`ident`.ident - A `String` identifier of the FlatBuffer file.Copyright © 2016–2017. All rights reserved.