Posted: Fri Mar 26, 2004 3:43 am Post subject: String to Int conversion
Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
I have stumbled against a similar scenario where a byte array contained a binary number.
Iterate through your array and write out each byte as hex (check out the byte methods). Then you can use Integer.decode method. Depending on your operating system you may have to reverse the order in the array(least significant/most significant) bit.
I used such a technique to decode the reason code from the dead letter queue header in java
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum