code: public final ByteBuffer putInt (int baseOffset, int value) {
        if (order == ByteOrder.BIG_ENDIAN) {
            for (int i = 3; i >= 0; i--) {
                byteArray.set(baseOffset + i, (byte)(value & 0xFF));
                value = value >> 8;
            }
        } else {
            for (int i = 0; i <= 3; i++) {
                byteArray.set(baseOffset + i, (byte)(value & 0xFF));
                value = value >> 8;
            }
        }
        return this;
      }
docs: Writes the given int to the specified index of this buffer.
  <p>
  The int is converted to bytes using the current byte order. The position is not changed.
  </p>
  
  @param index the index, must not be negative and equal or less than {@code limit - 4}.
  @param value the int to write.
  @return this buffer.
  @exception IndexOutOfBoundsException if {@code index} is invalid.
  @exception ReadOnlyBufferException if no changes may be made to the contents of this buffer.