Package io.objectbox.flatbuffers
Class FlexBuffers.Blob
java.lang.Object
io.objectbox.flatbuffers.FlexBuffers.Object
io.objectbox.flatbuffers.FlexBuffers.Sized
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
FieldsFields inherited from class io.objectbox.flatbuffers.FlexBuffers.Sized
sizeFields inherited from class io.objectbox.flatbuffers.FlexBuffers.Object
bb, byteWidth, end -
Constructor Summary
Constructors -
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[]toString()Returns a text(JSON) representation of theFlexBuffers.BlobAppend a text(JSON) representation of theFlexBuffers.Blobinto a `StringBuilder`Methods inherited from class io.objectbox.flatbuffers.FlexBuffers.Sized
size
-
Field Details
-
EMPTY
-
-
Constructor Details
-
Blob
Blob(ReadBuf buff, int end, int byteWidth)
-
-
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- Overrides:
toStringin classFlexBuffers.Object
-
toString
Append a text(JSON) representation of theFlexBuffers.Blobinto a `StringBuilder`- Specified by:
toStringin classFlexBuffers.Object
-