public abstract class AbstractTokenDecoder extends Object implements TokenDecoder
Modifier | Constructor and Description |
---|---|
protected |
AbstractTokenDecoder()
Initializes a new decoder.
|
Modifier and Type | Method and Description |
---|---|
void |
decodeField(BinaryReader source,
int fieldIndex,
boolean skip)
This implementation delegates to
TokenDecoder.decode(BinaryReader, boolean) . |
protected abstract void |
doTargetUpdated(TokenSettable target)
Sets the target buffer for decoding.
|
protected TokenSettable |
getTarget()
Returns the current target held by this decoder.
|
void |
setTarget(TokenSettable target)
This implementation sets the target variable and invokes
the method
doTargetUpdated(TokenSettable) . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode
public final void setTarget(TokenSettable target)
doTargetUpdated(TokenSettable)
.setTarget
in interface TokenDecoder
target
- the target buffer into which to decode.public void decodeField(BinaryReader source, int fieldIndex, boolean skip)
TokenDecoder.decode(BinaryReader, boolean)
.
Implementations that require field-specific handling should override
this method instead.decodeField
in interface TokenDecoder
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 targetprotected final TokenSettable getTarget()
protected abstract void doTargetUpdated(TokenSettable target)
target
- the buffer into which decoded valued
are writtenCopyright © 2021 Actian Corporation. All rights reserved.