readUnsignedInt method

int readUnsignedInt()

Reads and returns a 4-byte unsigned integer decoded with the current endian setting.

Throws EOFException if EOF is reached before the needed bytes are read.

Implementation

int readUnsignedInt() {
  if (seek + 4 > _source.lengthInBytes) {
    throw EOFException('Attempt to read beyond end of input');
  } else {
    final result = _asByteData.getUint32(seek, endian);
    seek += 4;
    return result;
  }
}