public static boolean matchingRows(final Cell left, final byte[] buf, final int offset,
    final int length) {
    if (left instanceof ByteBufferExtendedCell) {
      return ByteBufferUtils.equals(((ByteBufferExtendedCell) left).getRowByteBuffer(),
        ((ByteBufferExtendedCell) left).getRowPosition(), left.getRowLength(), buf, offset, length);
    }
    return Bytes.equals(left.getRowArray(), left.getRowOffset(), left.getRowLength(), 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