readShort method

int readShort({
  1. bool signed = false,
})
inherited

Reads a 2 byte short starting at readPosition.

Implementation

int readShort({bool signed = false}) {
  final value = signed
      ? readByteData!.getInt16(readPosition, _endianness)
      : readByteData!.getUint16(readPosition, _endianness);
  readPosition += 2;
  return value;
}