putInt method
Writes an integer into this buffer
Implementation
ByteBuffer putInt(int value) {
if (_pos + 4 > _buf.length) {
throw RangeError('Buffer overflow');
}
if (_byteOrder == ByteOrder.bigEndian) {
_buf[_pos++] = (value >>> 24) & 0xFF;
_buf[_pos++] = (value >>> 16) & 0xFF;
_buf[_pos++] = (value >>> 8) & 0xFF;
_buf[_pos++] = value & 0xFF;
} else {
_buf[_pos++] = value & 0xFF;
_buf[_pos++] = (value >>> 8) & 0xFF;
_buf[_pos++] = (value >>> 16) & 0xFF;
_buf[_pos++] = (value >>> 24) & 0xFF;
}
return this;
}