Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert Byte Array to Corresponding ASCII

807591May 27 2008 — edited May 28 2008
Good day, Im a newbie in Java. Im having problem converting byte array to its corresponding String/ASCII value.

I use this following codes to convert String to byte array:

/********************************************

String NewStr;

BigInteger temp = new BigInteger(NewStr, 16);
byte [] x = temp.toByteArray();

********************************************/

The output of x is = "[B@1a758cb"
Is there any way to convert it back to its original figure?

Thanks in advance..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 25 2008
Added on May 27 2008
11 comments
3,013 views