[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Please send email if you are having login problems - see the posts below for more info.
Hotmail and Yahoo! users - please see the Hotmail post or the Yahoo! post for information on lost emails.
Need help  XML
Forum Index » Java Programming
Author Message
newToJava

Newbie

Joined: 09/03/2010 07:56:32
Messages: 1
Offline

I have String stringName = "1010005100";
How do i conver that string to byte array, Unsigned Integer ( size 8 ).
The resul should be "0x00, 0x00, 0x00, 0x00, 0x3c, 0x33, 0x74, 0x6c"

This message was edited 1 time. Last update was at 09/03/2010 07:58:59

stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

You can convert it to a Hex string with something like:



If you then want to print out all of the individual Hex values you'd need to use a Formatter:



and pull two characters at a time out of the string.


Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
 
Forum Index » Java Programming
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2011 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle