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 void
Lifecycle callback invoked after thisDynamicDecoder
has finished decoding avalue
.doDecode()
Returns a newDecoder
continuation for thisDynamicDecoder
, ornull
if thisDynamicDecoder
is done.feed
(InputBuffer input) Incrementally decodes as muchinput
buffer data as possible, and returns anotherDecoder
that represents the continuation of how to decode additional buffer data.Returns aDecoder
continuation 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:Decoder
Incrementally decodes as muchinput
buffer data as possible, and returns anotherDecoder
that represents the continuation of how to decode additional buffer data. IfisLast
istrue
, thenfeed
must return a terminatedDecoder
, i.e. aDecoder
in the done state, or in the error state. The giveninput
buffer is only guaranteed to be valid for the duration of the method call; references toinput
must not be stored. -
fork
Description copied from class:Decoder
Returns aDecoder
continuation whose behavior may be altered by the given out-of-bandcondition
. -
bind
Description copied from class:Decoder
Returns the decoded result. Only guaranteed to return a result when in the done state. -
trap
Description copied from class:Decoder
Returns the decode error. Only guaranteed to return an error when in the error state. -
doDecode
Returns a newDecoder
continuation for thisDynamicDecoder
, ornull
if thisDynamicDecoder
is done. -
didDecode
Lifecycle callback invoked after thisDynamicDecoder
has finished decoding avalue
.
-