Package com.google.flatbuffers
Class ByteVector
- java.lang.Object
-
- com.google.flatbuffers.BaseVector
-
- com.google.flatbuffers.ByteVector
-
public final class ByteVector extends BaseVector
Helper type for accessing vector of signed or unsigned 8-bit values.
-
-
Field Summary
-
Fields inherited from class com.google.flatbuffers.BaseVector
bb
-
-
Constructor Summary
Constructors Constructor Description ByteVector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteVector__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.
-
-
-
Method Detail
-
__assign
public ByteVector __assign(int vector, ByteBuffer bb)
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.
-
-