readBytes method

Uint8List readBytes(
  1. int n
)

Implementation

Uint8List readBytes(int n) {
  print("[DEBUG] readBytes($n) at offset $_off remaining=$remaining");
  if (remaining < n)
    throw StateError('Need more data: wanted $n bytes, have $remaining.');
  final out = _data.sublist(_off, _off + n);
  _off += n;
  return out;
}