@Override
    public void add(final int index, final ByteBuffer element) {
        if (element == null) {
            throw new NullPointerException("element");
        }
        this.capacity += element.remaining();
        super.add(index, element);
    }
Create a new empty {@link RecyclableByteBufferList} instance with the given capacity.
jraft-core/src/main/java/com/alipay/sofa/jraft/util/RecyclableByteBufferList.java