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