private static int findCommonPrefixInFamilyPart(Cell left, KeyValue.KeyOnlyKeyValue right,
      int familyCommonPrefix) {
      if (left instanceof ByteBufferExtendedCell) {
        ByteBufferExtendedCell bbLeft = (ByteBufferExtendedCell) left;
        return ByteBufferUtils.findCommonPrefix(bbLeft.getFamilyByteBuffer(),
          bbLeft.getFamilyPosition() + familyCommonPrefix,
          left.getFamilyLength() - familyCommonPrefix, right.getFamilyArray(),
          right.getFamilyOffset() + familyCommonPrefix,
          right.getFamilyLength() - familyCommonPrefix);
      } else {
        return Bytes.findCommonPrefix(left.getFamilyArray(), right.getFamilyArray(),
          left.getFamilyLength() - familyCommonPrefix, right.getFamilyLength() - familyCommonPrefix,
          left.getFamilyOffset() + familyCommonPrefix,
          right.getFamilyOffset() + familyCommonPrefix);
      }
    }
Copies only the key part of the keybuffer by doing a deep copy and passes the seeker state
members for taking a clone. Note that the value byte[] part is still pointing to the
currentBuffer and represented by the valueOffset and valueLength
hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/BufferedDataBlockEncoder.java