java.lang.Object
com.pervasive.datarush.encoding.binary.AbstractTokenDecoder
- All Implemented Interfaces:
TokenDecoder
- Direct Known Subclasses:
SparseRecordDecoder
Base class for TokenEncoders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecodeField(BinaryReader source, int fieldIndex, boolean skip) This implementation delegates toTokenDecoder.decode(BinaryReader, boolean).protected abstract voiddoTargetUpdated(TokenSettable target) Sets the target buffer for decoding.protected final TokenSettableReturns the current target held by this decoder.final voidsetTarget(TokenSettable target) This implementation sets the target variable and invokes the methoddoTargetUpdated(TokenSettable).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.pervasive.datarush.encoding.TokenDecoder
decode
-
Constructor Details
-
AbstractTokenDecoder
protected AbstractTokenDecoder()Initializes a new decoder.
-
-
Method Details
-
setTarget
This implementation sets the target variable and invokes the methoddoTargetUpdated(TokenSettable).- Specified by:
setTargetin interfaceTokenDecoder- Parameters:
target- the target buffer into which to decode.
-
decodeField
This implementation delegates toTokenDecoder.decode(BinaryReader, boolean). Implementations that require field-specific handling should override this method instead.- Specified by:
decodeFieldin interfaceTokenDecoder- 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
-
getTarget
Returns the current target held by this decoder.- Returns:
- the current target held by this decoder.
-
doTargetUpdated
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
-