readUint16 method

int readUint16()

Read a 16-bit word from the stream.

Implementation

int readUint16() {
  final b1 = readByte();
  final b2 = readByte();
  if (byteOrder == ByteOrder.bigEndian) {
    return (b1 << 8) | b2;
  }
  return (b2 << 8) | b1;
}