| Author |
Hexadecimal to String and vis versa
|
Ayman Nour
Greenhorn
Joined: Mar 27, 2003
Posts: 9
|
|
hi all, Some data is stored in the database in hexadecimal format. how i can i convert it hexadecimal to normal string and vis versa?? please help.
|
 |
Peter den Haan
author
Ranch Hand
Joined: Apr 20, 2000
Posts: 3252
|
|
Integer.parseInt(hexString, 16) Integer.valueOf(hexString, 16) Integer.toString(number, 16) Integer.toHexString(number) There are Long versions of the same, should you wish. - Peter
|
 |
Ayman Nour
Greenhorn
Joined: Mar 27, 2003
Posts: 9
|
|
tank you peter. I will try them. how do i get a list of radix's?
|
 |
Peter den Haan
author
Ranch Hand
Joined: Apr 20, 2000
Posts: 3252
|
|
The radix of binary numbers is 2, of octal numbers 8, of decimal numbers 10, and of hexadecimal numbers 16 -- but you can use any radix you want. I think it goes a bit pear-shaped beyond radix 36, though, because you run out of letters to represent your digits - Peter
|
 |
 |
|
|
subject: Hexadecimal to String and vis versa
|
|
|