question: public static int compareNotNullUnsigned ( byte [ ] data1 , byte [ ] data2 ) { if ( data1 == data2 ) { return 0 ; } int len = Math . min ( data1 . length , data2 . length ) ; for ( int i = 0 ; i < len ; i ++ ) { int b = data1 [ i ] & 0xff ; int b2 = data2 [ i ] & 0xff ; if ( b != b2 ) { return b > b2 ? 1 : - 1 ; } } return Integer . signum ( data1 . length - data2 . length ) ; }
target:  Compare the contents of two byte arrays. If the content or length of the first array is smaller than the second array, -1 is returned. If the content or length of the second array is smaller than the first array, 1 is returned. If the contents and lengths are the same, 0 is returned. <p> This method interprets bytes as unsigned.