Converting Ascii to hex
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Paul_Bishop
Posted On:   Friday, March 8, 2002 03:06 AM

Has anybody got a method for converting Ascii to Hex.

Re: Converting Ascii to hex

Posted By:   Joseph_Smith  
Posted On:   Friday, March 8, 2002 08:29 AM

Since your APDU's consists of bytes, I'd recommend Byte.valueOf(string). The opposite would be Byte.toString(byte)

Re: Converting Ascii to hex

Posted By:   Christopher_Schultz  
Posted On:   Friday, March 8, 2002 05:36 AM

Do you mean converting from 'a' to '61'?



You can probably accomplish this by:




char c = 'a';
String s = Integer.toHexString((int)c);



-chris
About | Sitemap | Contact