readUint16 method

  1. @override
int readUint16 ()
override

Read a 16-bit word from the stream.

Implementation

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