@Override
  public void get(ByteBuffer out, int sourceOffset, int length) {
    checkRefCount();
    int itemIndex = getItemIndex(sourceOffset);
    ByteBuffer in = this.items[itemIndex];
    sourceOffset = sourceOffset - this.itemBeginPos[itemIndex];
    while (length > 0) {
      int toRead = Math.min(in.limit() - sourceOffset, length);
      ByteBufferUtils.copyFromBufferToBuffer(in, out, sourceOffset, toRead);
      length -= toRead;
      if (length == 0) {
        break;
      }
      itemIndex++;
      in = this.items[itemIndex];
      sourceOffset = 0;
    }
  }
Copies the content from an this MBB to a ByteBuffer
@param out          the ByteBuffer to which the copy has to happen, its position will be
                    advanced.
@param sourceOffset the offset in the MBB from which the elements has to be copied
@param length       the length in the MBB upto which the elements has to be copied
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/MultiByteBuff.java