readUint32 method

int readUint32()

Read a 32-bit word from the stream.

Implementation

int readUint32() {
  final b1 = buffer[offset++] & 0xff;
  final b2 = buffer[offset++] & 0xff;
  final b3 = buffer[offset++] & 0xff;
  final b4 = buffer[offset++] & 0xff;
  if (bigEndian) {
    return (b1 << 24) | (b2 << 16) | (b3 << 8) | b4;
  }
  return (b4 << 24) | (b3 << 16) | (b2 << 8) | b1;
}