BtcByteStreamReader extension Models
Serial-friendly reading helpers on a byte stream such as BtcConnection.input or BtcReconnectingConnection.input.
Methods
-
decoded(
{Encoding encoding = utf8}) → Stream< String> -
Available on Stream<
Decodes incoming bytes to text as they arrive, correctly handling multi-byte characters split across chunk boundaries. Not line-buffered.Uint8List> , provided by the BtcByteStreamReader extension -
frames(
{List< int> delimiter = const [0x0A], int? maxFrameLength}) → Stream<Uint8List> -
Available on Stream<
Splits this stream intoUint8List> , provided by the BtcByteStreamReader extensiondelimiter-separated frames (delimiter stripped), reassembling frames that span multiple chunks. See BtcFrameSplitter. -
lines(
{Encoding encoding = utf8, int? maxLineLength}) → Stream< String> -
Available on Stream<
Emits decoded text lines. Splits onUint8List> , provided by the BtcByteStreamReader extension\n, strips a trailing\rso both\n- and\r\n-terminated devices read cleanly, and decodes each line withencoding(UTF-8 by default).