private static ByteBuff wrap(List<ByteBuffer> buffers, RefCnt refCnt) {
    if (buffers == null || buffers.size() == 0) {
      throw new IllegalArgumentException("buffers shouldn't be null or empty");
    }
    return buffers.size() == 1
      ? new SingleByteBuff(refCnt, buffers.get(0))
      : new MultiByteBuff(refCnt, buffers.toArray(new ByteBuffer[0]));
  }
Calling this method in strategic locations where ByteBuffs are referenced may help diagnose
potential buffer leaks. We pass the buffer itself as a default hint, but one can use
{@link #touch(Object)} to pass their own hint as well.
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/ByteBuff.java