@Override
  public int capacity() {
    checkRefCount();
    int c = 0;
    for (ByteBuffer item : this.items) {
      c += item.capacity();
    }
    return c;
  }
Returns the total capacity of this MultiByteBuffer.
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/MultiByteBuff.java