CodecFilter<P, CB extends CodecBuffer<P>> constructor

CodecFilter<P, CB extends CodecBuffer<P>>({
  1. required int inputBufferLength,
  2. required int outputBufferLength,
})

Constructor which allows the user to set the input/output buffer lengths.

If inputBufferLength and/or outputBufferLength are not provided, they will be null and subclasses will have the opportunity to set these up.

The filter will transition from the CodecFilterState.closed to the CodecFilterState.init state after the call.

Implementation

CodecFilter(
    {required int inputBufferLength, required int outputBufferLength}) {
  state = CodecFilterState.init;
  _inputBufferHolder = newBufferHolder(inputBufferLength);
  _outputBufferHolder = newBufferHolder(outputBufferLength);
}