writeInt16 method
Implementation
void writeInt16(int value) {
assert(value > -32768);
assert(value < 32768);
if (value > 0) {
writeUInt8(((value >> 8) & 0xff | 0x80));
writeUInt8((value & 0xff));
} else {
writeUInt8((-value >> 8) & 0x7f);
writeUInt8((-value & 0xff));
}
}