Class AbstractTokenDecoder

    • Constructor Detail

      • AbstractTokenDecoder

        protected AbstractTokenDecoder()
        Initializes a new decoder.
    • Method Detail

      • decodeField

        public void decodeField​(BinaryReader source,
                                int fieldIndex,
                                boolean skip)
        This implementation delegates to TokenDecoder.decode(BinaryReader, boolean). Implementations that require field-specific handling should override this method instead.
        Specified by:
        decodeField in interface TokenDecoder
        Parameters:
        source - the reader containing the encoding
        fieldIndex - the index of the field being decoded
        skip - a value of true means decode the bytes but don't set on target
      • getTarget

        protected final TokenSettable getTarget()
        Returns the current target held by this decoder.
        Returns:
        the current target held by this decoder.
      • doTargetUpdated

        protected abstract void doTargetUpdated​(TokenSettable target)
        Sets the target buffer for decoding. Invoked when the target is initially set or updated.
        Parameters:
        target - the buffer into which decoded valued are written