readUnsignedLong method

int readUnsignedLong()

Reads and returns an 8-byte unsigned integer, converted to a Dart int according to the semantics of ByteData.getUint64 using the current endian setting.

NOTE: Dart doesn't support unsigned longs, but you can get an unsigned BigInt using BigInt.toUnsigned.

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

Implementation

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