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!

converting byte array to String.

807603Mar 2 2006 — edited Nov 15 2007
Hi I have tried to convert byte array to string.
I have used following code.
new String(byteArray);
sometimes, it is converting properly. sometimes it isnot.
so, I tried with different way like, new String(byteArray, "utf-8");
and utf 16 etc.
but, nothing is working out.
the main problem is, some character it is encrypting into "?" which is not the correct one. if any body knows to convert byte array to string, could you please reply.
thanks
chandra sekhar
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 13 2007
Added on Mar 2 2006
15 comments
1,708 views