Is there any java utility to convert a string to a hexadecimal value (integer)?
If you have a line starting with 0x or #
Integer.decode(hexStr);
is the goal
Or
Integer.parseInt(hexString, 16);
Is this what you are looking for?
Integer.toHexString(Integer.parseInt(String));
, .
(, "ab10" ),
int i = Integer.valueOf(s, 16).intValue();
Integer class:
Integer.toHexString(Integer.parseInt(myString, 10))