public static boolean matchingFamily(final Cell left, final byte[] buf, final int offset,
    final int length) {
    if (left instanceof ByteBufferExtendedCell) {
      return ByteBufferUtils.equals(((ByteBufferExtendedCell) left).getFamilyByteBuffer(),
        ((ByteBufferExtendedCell) left).getFamilyPosition(), left.getFamilyLength(), buf, offset,
        length);
    }
    return Bytes.equals(left.getFamilyArray(), left.getFamilyOffset(), left.getFamilyLength(), buf,
      offset, length);
  }
Made into a static method so as to reuse the logic within
ValueAndTagRewriteByteBufferExtendedCell
hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java