Package io.objectbox.flatbuffers
Class ByteVector
java.lang.Object
io.objectbox.flatbuffers.BaseVector
io.objectbox.flatbuffers.ByteVector
Helper type for accessing vector of signed or unsigned 8-bit values.
-
Field Summary
Fields inherited from class io.objectbox.flatbuffers.BaseVector
bb -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription__assign(int vector, ByteBuffer bb) Assigns vector access object to vector data.byteget(int j) Reads the byte at the given index.intgetAsUnsigned(int j) Reads the byte at the given index, zero-extends it to type int, and returns the result, which is therefore in the range 0 through 255.
-
Constructor Details
-
ByteVector
public ByteVector()
-
-
Method Details
-
__assign
Assigns vector access object to vector data.- Parameters:
vector- Start data of a vector.bb- Table's ByteBuffer.- Returns:
- Returns current vector access object assigned to vector data whose offset is stored at `vector`.
-
get
public byte get(int j) Reads the byte at the given index.- Parameters:
j- The index from which the byte will be read.- Returns:
- the 8-bit value at the given index.
-
getAsUnsigned
public int getAsUnsigned(int j) Reads the byte at the given index, zero-extends it to type int, and returns the result, which is therefore in the range 0 through 255.- Parameters:
j- The index from which the byte will be read.- Returns:
- the unsigned 8-bit at the given index.
-