skip method Null safety

  1. @override
void skip(
  1. int length
)
override

Move the read position by count bytes.

Implementation

@override
void skip(int length) {
  if ((_bufferPosition + length) < _bufferSize) {
    _bufferPosition += length;
  } else {
    var remaining = length - (_bufferSize - _bufferPosition);
    while (!isEOS) {
      _readBuffer();
      if (remaining < _bufferSize) {
        _bufferPosition += remaining;
        break;
      }
      remaining -= _bufferSize;
    }
  }
}