Interface BytesSupplier

    • Method Detail

      • getAsBytes

        default byte[] getAsBytes()
        Returns the byte[] presentation of the object.
        Returns:
        the byte[] presentation of the object
      • getAsString

        default java.lang.String getAsString()
        Returns the String presentation of the object.
        Returns:
        the String presentation of the object
      • getAsObject

        default java.lang.Object getAsObject()
        Returns the object that backs this BytesSupplier.
        Returns:
        the object that backs this BytesSupplier
      • toByteBuffer

        java.nio.ByteBuffer toByteBuffer()
        Returns the ByteBuffer presentation of the object.
        Returns:
        the ByteBuffer presentation of the object
      • wrap

        static BytesSupplier wrap​(byte[] buf)
        Wraps a byte array into a {code BytesSupplier}.
        Parameters:
        buf - the byte array that will back this {code BytesSupplier}
        Returns:
        a BytesSupplier
      • wrap

        static BytesSupplier wrap​(java.lang.String value)
        Wraps a string into a {code BytesSupplier}.
        Parameters:
        value - the string that will back this {code BytesSupplier}
        Returns:
        a BytesSupplier
      • wrapAsJson

        static BytesSupplier wrapAsJson​(java.lang.Object object)
        Wraps an object as json into a {code BytesSupplier}.
        Parameters:
        object - the object that will back this {code BytesSupplier}
        Returns:
        a BytesSupplier