readUint16 method
Implementation
int readUint16(int position, int fileSize) {
if (position >= (_fileSize - 2) || position < 0) {
return 0;
}
if (position < _position || position >= (_position + (_bufferSize - 2))) {
_readBuffer(position, fileSize);
}
var p = position - _position;
final b1 = _buffer[p++];
final b2 = _buffer[p++];
if (byteOrder == BIG_ENDIAN) {
return (b1 << 8) | b2;
}
return (b2 << 8) | b1;
}