- 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
Modifier and TypeMethodDescriptionvoiddecode(BinaryReader source, boolean skip) Decodes the encoding at the current position of the reader and stores the value in the current target.voiddecodeField(BinaryReader source, int fieldIndex, boolean skip) Decodes the encoding at the current position of the reader and stores the value in the current target.voidsetTarget(TokenSettable buffer) Designates the current target for decoding operations.
-
Method Details
-
setTarget
Designates the current target for decoding operations.- Parameters:
buffer- the target buffer into which to decode.
-
decode
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 encodingskip- a value of true means decode the bytes but don't set on target
-
decodeField
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 encodingfieldIndex- the index of the field being decodedskip- a value of true means decode the bytes but don't set on target
-