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 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[]String
toString()
Returns a text(JSON) representation of theFlexBuffers.Blob
StringBuilder
toString(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 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 String toString()
Returns a text(JSON) representation of theFlexBuffers.Blob
-
toString
public StringBuilder toString(StringBuilder sb)
Append a text(JSON) representation of theFlexBuffers.Blob
into a `StringBuilder`
-
-