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.ObjectRepresents 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.ByteBufferdata()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[]java.lang.StringtoString()Returns a text(JSON) representation of theFlexBuffers.Blobjava.lang.StringBuildertoString(java.lang.StringBuilder sb)Append a text(JSON) representation of theFlexBuffers.Blobinto a `StringBuilder`
-
-
-
Method Detail
-
empty
public static FlexBuffers.Blob empty()
Return an emptyFlexBuffers.Blob
-
data
public java.nio.ByteBuffer 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
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.Blobinto a `StringBuilder`
-
-