Class ByteVector

java.lang.Object
io.objectbox.flatbuffers.BaseVector
io.objectbox.flatbuffers.ByteVector

public final class ByteVector extends BaseVector
Helper type for accessing vector of signed or unsigned 8-bit values.
  • Constructor Details

    • ByteVector

      public ByteVector()
  • Method Details

    • __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.