Package com.google.flatbuffers
Class FlexBuffers.Blob
- java.lang.Object
-
- com.google.flatbuffers.FlexBuffers.Blob
-
- Enclosing class:
- FlexBuffers
public static class FlexBuffers.Blob extends 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 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[]StringtoString()Returns a text(JSON) representation of theFlexBuffers.BlobStringBuildertoString(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 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 String toString()
Returns a text(JSON) representation of theFlexBuffers.Blob
-
toString
public StringBuilder toString(StringBuilder sb)
Append a text(JSON) representation of theFlexBuffers.Blobinto a `StringBuilder`
-
-