public static int compareKey ( byte [ ] key1 , byte [ ] key2 ) { return compareKey ( key1 , key2 , Math . min ( key1 . length , key2 . length ) ) ; }
Compares the two byte - arrays on the basis of unsigned bytes . The array will be compared by each element up to the length of the smaller array . If all elements are equal and the array are not equal sized the larger array is seen as larger .