readInt32 method

int readInt32(
  1. [Endian endian = Endian.big]
)

Reads a 32-it signed integer. Increments index by 4.

Implementation

int readInt32([Endian endian = Endian.big]) {
  final byteData = this._byteData;
  final index = this.index;
  final newIndex = index + 4;
  if (newIndex > byteData.lengthInBytes) {
    throw _eofException(index, "int32");
  }
  final value = _byteData.getInt32(index, endian);
  this.index = index + 4;
  return value;
}