Without the full code it is difficult to be certain, but the "for input string: xx" form is usually the message associated with NumberFormatException. Are you converting (part of) the string to a number by using Integer.valueOf(), Integer.parseInt() or similar methods by chance?
If this is the case in order to have them accept an hexadecimal digit (a-f) you need to explicitly state you are passing in a 16-base digit, by calling the methods that accept a second parameter for the radix - e.g. Integer.valueOf(string, 16).
Also, like others pointed out already, the correct way to compare strings is to use the equals method, since the == operator will only return true if the two references points to the exact same object, regardless of its value (content).