java.lang.Object
swim.codec.Decoder<O>
swim.codec.DynamicDecoder<O>
Dynamically generated
Decoder continuation.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbind()Returns the decoded result.protected abstract voidLifecycle callback invoked after thisDynamicDecoderhas finished decoding avalue.doDecode()Returns a newDecodercontinuation for thisDynamicDecoder, ornullif thisDynamicDecoderis done.feed(InputBuffer input) Incrementally decodes as muchinputbuffer data as possible, and returns anotherDecoderthat represents the continuation of how to decode additional buffer data.Returns aDecodercontinuation whose behavior may be altered by the given out-of-bandcondition.trap()Returns the decode error.
-
Field Details
-
decoding
Current decoder continuation.
-
-
Constructor Details
-
DynamicDecoder
public DynamicDecoder()
-
-
Method Details
-
feed
Description copied from class:DecoderIncrementally decodes as muchinputbuffer data as possible, and returns anotherDecoderthat represents the continuation of how to decode additional buffer data. IfisLastistrue, thenfeedmust return a terminatedDecoder, i.e. aDecoderin the done state, or in the error state. The giveninputbuffer is only guaranteed to be valid for the duration of the method call; references toinputmust not be stored. -
fork
Description copied from class:DecoderReturns aDecodercontinuation whose behavior may be altered by the given out-of-bandcondition. -
bind
Description copied from class:DecoderReturns the decoded result. Only guaranteed to return a result when in the done state. -
trap
Description copied from class:DecoderReturns the decode error. Only guaranteed to return an error when in the error state. -
doDecode
Returns a newDecodercontinuation for thisDynamicDecoder, ornullif thisDynamicDecoderis done. -
didDecode
Lifecycle callback invoked after thisDynamicDecoderhas finished decoding avalue.
-