writeUint16 method
Write a 16-bit word to the end of the buffer.
Implementation
void writeUint16(int value) {
if (bigEndian) {
writeByte((value >> 8) & 0xff);
writeByte(value & 0xff);
return;
}
writeByte(value & 0xff);
writeByte((value >> 8) & 0xff);
}