code: public ByteBufferWriter putInt(final int index, int value) {
          int start = 0;
          ByteBuffer[] buffs = this.buffers;
          for (int i = 0; i < buffs.length; i++) {
              int pos = buffs[i].position();
              if (pos + start > index) {
                  int r = pos + start - index;
                  if (r >= 4) {
                      buffs[i].putInt(index - start, value);
                      return this;
                  } else {
                      byte b1 = bigEndian ? (byte) ((value >> 24) & 0xFF) : (byte) (value & 0xFF);
                      byte b2 = bigEndian ? (byte) ((value >> 16) & 0xFF) : (byte) ((value >> 8) & 0xFF);
                      byte b3 = bigEndian ? (byte) ((value >> 8) & 0xFF) : (byte) ((value >> 16) & 0xFF);
                      byte b4 = bigEndian ? (byte) (value & 0xFF) : (byte) ((value >> 24) & 0xFF);
                      if (r == 3) {
                          buffs[i].put(index - start, b1);
                          buffs[i].put(index - start + 1, b2);
                          buffs[i].put(index - start + 2, b3);
                          buffs[i + 1].put(0, b4);
                      } else if (r == 2) {
                          buffs[i].put(index - start, b1);
                          buffs[i].put(index - start + 1, b2);
                          buffs[i + 1].put(0, b3);
                          buffs[i + 1].put(1, b4);
                      } else if (r == 1) {
                          buffs[i].put(index - start, b1);
                          buffs[i + 1].put(0, b2);
                          buffs[i + 1].put(1, b3);
                          buffs[i + 1].put(2, b4);
                      }
                      return this;
                  }
              } else {
                  start += pos;
              }
          }
          throw new ArrayIndexOutOfBoundsException(index);
      }
docs: 重新设置指定位置的值