private static boolean compare ( byte [ ] what , String with ) { if ( what . length != with . length ( ) ) { return false ; } for ( int i = 0 ; i < what . length ; i ++ ) { if ( with . charAt ( i ) != what [ i ] ) { return false ; } } return true ; }
Compares some bytes with the text we re expecting