public static boolean arrayEndsWith ( final byte [ ] array , final byte [ ] str ) { boolean result = false ; if ( array . length >= str . length ) { result = true ; int index = str . length ; int arrindex = array . length ; while ( -- index >= 0 ) { if ( array [ -- arrindex ] != str [ index ] ) { result = false ; break ; } } } return result ; }
Check that a byte array ends with some byte values .