CodecFilter<P, CB extends CodecBuffer<P> > class
abstract
Subclasses of CodecFilter provide low-level interfaces to their algorithms and direct the processing of data.
Generics:
P
defines the type to use for the CodecBuffer's memory pointer.
CB
is the implementation type for an abstract CodecBuffer of type P
A CodecFilter contains two buffers.
An buffer _inputBuffer
to incoming bytes to process.
an buffer _outputBuffer
to for outgoing processed bytes.
A CodecFilter also maintains a state which can help implementations know what part of the lifecycle the filter is in (i.e. processing vs closed)
- Implementers
Constructors
- CodecFilter({required int inputBufferLength, required int outputBufferLength})
- Constructor which allows the user to set the input/output buffer lengths.
Properties
- closed → bool
-
Return true if filter is in closed state.
no setter
- finalized → bool
-
Return true if filter is in finalized state.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- init → bool
-
Return true if filter is in init state.
no setter
- processing → bool
-
Return true if filter is in opened state.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state ↔ CodecFilterState
-
State tracker for filters.
getter/setter pair
Methods
-
close(
) → void - Close this filter if not already closed.
-
doClose(
) → void - Subclass Responsibility: Tear-down the filter
-
doFinalize(
CB outputBuffer) → int - Subclass Responsibility: Perform algorithm-specific finalization.
-
doFlush(
CB outputBuffer) → int - Subclass Responsibility: Perform algorithm-specific flush.
-
doInit(
CodecBufferHolder< P, CB> inputBufferHolder, CodecBufferHolder<P, CB> outputBufferHolder, List<int> bytes, int start, int end) → int - Subclass Responsibility: Init the filter
-
doProcessing(
CB inputBuffer, CB outputBuffer) → CodecResult - Subclass Responsibility: Algorithm-specific coding/decoding handler
-
hasMoreToProcess(
) → bool -
Return
true
if there is more data to process,false
otherwise. -
newBufferHolder(
int bufferLength) → CodecBufferHolder< P, CB> - Subclass Responsibility: Return a concrete CodecBufferHolder.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
process(
List< int> data, int start, int end) → void -
Process a chunk of
data
fromstart
toend
. A call to process should only be made when processed returnsnull
. -
processed(
{bool flush = true, bool end = false}) → List< int> ? - Return a chunk of processed data.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited