Interface VariantValue

    • Method Detail

      • sizeInBytes

        int sizeInBytes()
        Returns the serialized size in bytes of this value.
      • writeTo

        int writeTo​(java.nio.ByteBuffer buffer,
                    int offset)
        Writes this value to the buffer at the given offset, ignoring the buffer's position and limit.
      • asPrimitive

        default VariantPrimitive<?> asPrimitive()
        Returns this value as a VariantPrimitive.
        Throws:
        java.lang.IllegalArgumentException - if the value is not a primitive
      • asObject

        default VariantObject asObject()
        Returns this value as a VariantObject.
        Throws:
        java.lang.IllegalArgumentException - if the value is not an object
      • asArray

        default VariantArray asArray()
        Returns this value as a VariantArray.
        Throws:
        java.lang.IllegalArgumentException - if the value is not an array