Class FlexBuffers.Blob

java.lang.Object
io.objectbox.flatbuffers.FlexBuffers.Blob
Enclosing class:
FlexBuffers

public static class FlexBuffers.Blob extends Object
Represents a array of bytes element in the buffer

It can be converted to `ReadBuf` using data(), copied into a byte[] using getBytes() or have individual bytes accessed individually using get(int)

  • Field Details

    • size

      protected final int size
  • Method Details

    • empty

      public static FlexBuffers.Blob empty()
      Return an empty FlexBuffers.Blob
    • data

      public ByteBuffer data()
      Return FlexBuffers.Blob as `ReadBuf`
      Returns:
      blob as `ReadBuf`
    • getBytes

      public byte[] getBytes()
      Copy blob into a byte[]
      Returns:
      blob as a byte[]
    • get

      public byte get(int pos)
      Return individual byte at a given position
      Parameters:
      pos - position of the byte to be read
    • toString

      public String toString()
      Returns a text(JSON) representation of the FlexBuffers.Blob
    • toString

      public StringBuilder toString(StringBuilder sb)
      Append a text(JSON) representation of the FlexBuffers.Blob into a `StringBuilder`
    • size

      public int size()