private boolean subArraysEqualWithMask ( byte [ ] a , int aStart , byte [ ] b , int bStart , byte [ ] mask , int maskStart , int len ) { for ( int i = aStart , j = bStart , k = maskStart ; len > 0 ; i ++ , j ++ , k ++ , len -- ) { if ( ( a [ i ] & mask [ k ] ) != ( b [ j ] & mask [ k ] ) ) { return false ; } } return true ; }
Returns true if subarrays are equal with the given mask .