TerminatedTransformer class

This transformer takes an incoming stream and splits it along the "terminator" marks. Great for parsing incoming serial streams that end on \r\n.

Implemented types

Constructors

TerminatedTransformer({bool sync = false, bool? cancelOnError, Uint8List? terminator, int maxLen = 1024, dynamic stripTerminator = true})
Splits the incoming stream at the given terminator sequence. 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.
TerminatedTransformer.broadcast({bool sync = false, bool? cancelOnError, Uint8List? terminator, int maxLen = 1024, dynamic stripTerminator = true})
Splits the incoming stream at the given terminator sequence. 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.

Properties

cancelOnError bool?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
maxLen int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stripTerminator → dynamic
final
terminator Uint8List?
final

Methods

bind(Stream<Uint8List> stream) Stream<Uint8List>
Transforms the provided stream.
override
cast<RS, RT>() StreamTransformer<RS, RT>
Provides a StreamTransformer<RS, RT> view of this stream transformer.
override
dispose() → void
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onData(Uint8List data) → void
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited