public static int findCommonPrefix(byte[] left, int leftOffset, int leftLength, byte[] right,
    int rightOffset, int rightLength) {
    return Bytes.findCommonPrefix(left, right, leftLength, rightLength, leftOffset, rightOffset);
  }
Find length of common prefix in two arrays.
@param left        Array to be compared.
@param leftOffset  Offset in left array.
@param leftLength  Length of left array.
@param right       Array to be compared.
@param rightOffset Offset in right array.
@param rightLength Length of right array.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java