writeInt16 method

int writeInt16(
  1. int n, [
  2. Endian endian = Endian.big
])

Writes an Int16.

Implementation

int writeInt16(int n, [Endian endian = Endian.big]) {
  final pos = bytesIO.position;
  bytesIO.ensureCapacity(pos + 2);
  _bytesData.setInt16(pos, n, endian);
  bytesIO.incrementPosition(2);
  return 2;
}