String as \x03\x00\x00\x00 to integer

Posted by marta on Stack Overflow See other posts from Stack Overflow or by marta
Published on 2012-06-01T07:58:23Z Indexed on 2012/07/07 3:16 UTC
Read the original article Hit count: 126

Filed under:
|
|

Helo:

I have a question, that I solved in c, but now I want to do it in hava: I have a String like: '\x03\x00\x00\x00' This is representing an hexadecimal value of a integer. I transform to 0x03\0x00... And now I want to obtain the integer, but I don't know how to do it in java

could someone give me some idea ?

Thanks in advance

(Is it some way to use this format ('\x03\x00\x00\x00' ) directly without use byte[] arrays? and in C can I use this format directly to build a integer (int)?)

© Stack Overflow or respective owner

Related posts about java

Related posts about string