appendInt2 method

void appendInt2(
  1. int value
)

Converts four bytes from the read buffer to a signed int.

The byte order is big-endian.

@return the int value.

Implementation

void appendInt2(int value) {
  this._bufferPosition += 2;
  _ensureBuffer();
  if (value >= 0) {
    _bufferData.add((value >> 8) & 0x7f);
    _bufferData.add((value) & 0xff);
  } else {
    _bufferData.add((value >> 8) & 0xff);
    _bufferData.add((value) & 0xff);
  }
}