stringTerminated static method

Transaction<String> stringTerminated(
  1. Stream<Uint8List> stream,
  2. Uint8List terminator, {
  3. int maxLen = 1024,
  4. bool stripTerminator = true,
})

Create a transaction that transforms the incoming stream into events delimited by 'terminator', returning Strings.

var c = Transaction.stringTerminated(p.inputStream, Uint8List.fromList([13, 10]));

Implementation

static Transaction<String> stringTerminated(
    Stream<Uint8List> stream, Uint8List terminator,
    {int maxLen = 1024, bool stripTerminator = true}) {
  return Transaction<String>(
      stream,
      TerminatedStringTransformer.broadcast(
          terminator: terminator,
          maxLen: maxLen,
          stripTerminator: stripTerminator));
}