readRawReader method

RawReader readRawReader(
  1. int length
)

Returns a new RawReader that is backed by a span of this RawReader.

Implementation

RawReader readRawReader(int length) {
  final byteData = this._byteData;
  final index = this.index;
  final result = new RawReader.withByteData(
    new ByteData.view(
      byteData.buffer,
      byteData.offsetInBytes + index,
      length,
    ),
  );
  this.index = index + length;
  return result;
}