TerminatedStringTransformer constructor
TerminatedStringTransformer({})
Splits the incoming stream at the given terminator sequence and converts to input to a string.
maxLen is the maximum number of bytes that will be collected before a terminator is detected. If more data arrives the oldest bytes will be discarded. terminator is a Uint8List of bytes. stripTerminator is a boolean indicating if the terminator should remain attached in the output.
This constructor creates a single string stream
Implementation
TerminatedStringTransformer({bool sync = false, this.cancelOnError, this.terminator, this.maxLen = 1024, this.stripTerminator = true}) {
_partial = [];
_controller = new StreamController<String>(
onListen: _onListen,
onCancel: _onCancel,
onPause: () {
_subscription!.pause();
},
onResume: () {
_subscription!.resume();
},
sync: sync);
}