readTo method

  1. @override
int readTo(
  1. BytesIO io, [
  2. int? length
])
override

Read length bytes into io.

Implementation

@override
int readTo(BytesIO io, [int? length]) {
  length ??= remaining;
  var bs = readBytes(length);
  io.writeAll(bs);
  return bs.length;
}