public static int copyFamilyTo(Cell cell, ByteBuffer destination, int destinationOffset) {
    byte fLen = cell.getFamilyLength();
    if (cell instanceof ByteBufferExtendedCell) {
      ByteBufferUtils.copyFromBufferToBuffer(((ByteBufferExtendedCell) cell).getFamilyByteBuffer(),
        destination, ((ByteBufferExtendedCell) cell).getFamilyPosition(), destinationOffset, fLen);
    } else {
      ByteBufferUtils.copyFromArrayToBuffer(destination, destinationOffset, cell.getFamilyArray(),
        cell.getFamilyOffset(), fLen);
    }
    return destinationOffset + fLen;
  }
Copies the family to the given bytebuffer
@param cell              the cell whose family has to be copied
@param destination       the destination bytebuffer to which the family has to be copied
@param destinationOffset the offset in the destination bytebuffer
@return the offset of the bytebuffer after the copy has happened
hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java