readUint16 method

int readUint16()

Read a 16-bit word from the stream.

Implementation

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