Interface TokenDecoder

  • All Known Subinterfaces:
    ComparableTokenDecoder
    All Known Implementing Classes:
    AbstractTokenDecoder, SparseRecordDecoder

    public interface TokenDecoder
    Converts binary encodings of tokens into token values. Implementations should extend AbstractTokenDecoder rather than implementing this interface directly.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void decode​(BinaryReader source, boolean skip)
      Decodes the encoding at the current position of the reader and stores the value in the current target.
      void decodeField​(BinaryReader source, int fieldIndex, boolean skip)
      Decodes the encoding at the current position of the reader and stores the value in the current target.
      void setTarget​(TokenSettable buffer)
      Designates the current target for decoding operations.
    • Method Detail

      • setTarget

        void setTarget​(TokenSettable buffer)
        Designates the current target for decoding operations.
        Parameters:
        buffer - the target buffer into which to decode.
      • decode

        void decode​(BinaryReader source,
                    boolean skip)
        Decodes the encoding at the current position of the reader and stores the value in the current target. The reader is advanced past the encoding as a result.
        Parameters:
        source - the reader containing the encoding
        skip - a value of true means decode the bytes but don't set on target
      • decodeField

        void decodeField​(BinaryReader source,
                         int fieldIndex,
                         boolean skip)
        Decodes the encoding at the current position of the reader and stores the value in the current target. The reader is advanced past the encoding as a result.
        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