readByte method Null safety

  1. @override
int readByte()
override

Read a single byte.

Implementation

@override
int readByte() {
  if (isEOS) {
    return 0;
  }
  if (_bufferPosition >= _bufferSize) {
    _readBuffer();
  }
  if (_bufferPosition >= _bufferSize) {
    return 0;
  }
  return _buffer[_bufferPosition++] & 0xff;
}