convert double to hex string
807603Dec 9 2007 — edited Dec 9 2007I am new to java programming and need help to convert different types to hex string in java: ( then send the string to C message queue )
For the char[] "012" -> ascii string 303132
integer 178 -> ascii string 000000B2, which I can use Integer.toHexString,
but for double 1234.56, the c converted struct is *[40934A3D70A3D70A]*
while Double.toHexString is *[0x1.34a3d70a3d70ap10]*,
How do I know the rule to get the correct one *[40934A3D70A3D70A]*?
or the struct depends on the OS ? i am using SunOS 5.8 sparc SUNW,Sun-Fire-V440
Thx.