Package io.objectbox.flatbuffers
Class FlexBuffers.Blob
- java.lang.Object
-
- io.objectbox.flatbuffers.FlexBuffers.Blob
-
- Enclosing class:
- FlexBuffers
public static class FlexBuffers.Blob extends java.lang.Object
Represents a array of bytes element in the bufferIt can be converted to `ReadBuf` using
data()
, copied into a byte[] usinggetBytes()
or have individual bytes accessed individually usingget(int)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffer
data()
ReturnFlexBuffers.Blob
as `ReadBuf`static FlexBuffers.Blob
empty()
Return an emptyFlexBuffers.Blob
byte
get(int pos)
Return individual byte at a given positionbyte[]
getBytes()
Copy blob into a byte[]java.lang.String
toString()
Returns a text(JSON) representation of theFlexBuffers.Blob
java.lang.StringBuilder
toString(java.lang.StringBuilder sb)
Append a text(JSON) representation of theFlexBuffers.Blob
into a `StringBuilder`
-
-
-
Method Detail
-
empty
public static FlexBuffers.Blob empty()
Return an emptyFlexBuffers.Blob
-
data
public java.nio.ByteBuffer data()
ReturnFlexBuffers.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 java.lang.String toString()
Returns a text(JSON) representation of theFlexBuffers.Blob
-
toString
public java.lang.StringBuilder toString(java.lang.StringBuilder sb)
Append a text(JSON) representation of theFlexBuffers.Blob
into a `StringBuilder`
-
-