Interface TokenEncoder

    • Method Detail

      • setSource

        void setSource​(TokenValued source)
        Sets the container holding values to be encoded. A reference to this container is held and accessed only when an encoding is requested.
        Parameters:
        source - the value container to encode
      • encode

        void encode​(BinaryBuilder buffer)
        Appends the encoded version of the current value of the source to the supplied buffer.
        Parameters:
        buffer - the buffer to which to append the encoding
      • encodeField

        void encodeField​(BinaryBuilder buffer,
                         int index)
        Appends the encoded version of the current value of the source to the supplied buffer.
        Parameters:
        buffer - the buffer to which to append the encoding
        index - the index of the field to encode