Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert hex string to int

807603Nov 19 2007 — edited Nov 19 2007
I would appreciate any help/advice on how to convert a hex string to an unsign int. I have the following
String hexString = "0x45 0xFF 0x09";
I need to extract the hex values from the string and convert it to an unsigned int. However, I have a problem when extracting '0xFF' - it is converted to a negative value, rather than 255.

I receive the values in String format. So I cannot change the way in which it is sent.

I would appreciate any help! Thank you in advance!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2007
Added on Nov 19 2007
2 comments
930 views