Package io.objectbox.flatbuffers
Class FlexBuffers.Blob
java.lang.Object
io.objectbox.flatbuffers.FlexBuffers.Blob
- Enclosing class:
- FlexBuffers
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondata()ReturnFlexBuffers.Blobas `ReadBuf`static FlexBuffers.Blobempty()Return an emptyFlexBuffers.Blobbyteget(int pos) Return individual byte at a given positionbyte[]getBytes()Copy blob into a byte[]intsize()toString()Returns a text(JSON) representation of theFlexBuffers.BlobAppend a text(JSON) representation of theFlexBuffers.Blobinto a `StringBuilder`
-
Field Details
-
size
protected final int size
-
-
Method Details
-
empty
Return an emptyFlexBuffers.Blob -
data
ReturnFlexBuffers.Blobas `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
Returns a text(JSON) representation of theFlexBuffers.Blob -
toString
Append a text(JSON) representation of theFlexBuffers.Blobinto a `StringBuilder` -
size
public int size()
-