Class FlexBuffers.Blob

  • Enclosing class:
    FlexBuffers

    public static class FlexBuffers.Blob
    extends java.lang.Object
    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)

    • Method Detail

      • data

        public java.nio.ByteBuffer data()
        Return FlexBuffers.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 the FlexBuffers.Blob
      • toString

        public java.lang.StringBuilder toString​(java.lang.StringBuilder sb)
        Append a text(JSON) representation of the FlexBuffers.Blob into a `StringBuilder`