aspose file tools
The moose likes Java in General and the fly likes can i transform the Byte array to a String ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "can i transform the Byte array to a String ?" Watch "can i transform the Byte array to a String ?" New topic
Author

can i transform the Byte array to a String ?

omar bili
Ranch Hand

Joined: Aug 13, 2004
Posts: 177
Hi
can i transform the Byte array to a String ?
plz tell me on how i can send a byte array
using an printWriter and a BufferedReader .
Thanks all
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
byte[] b = ...
String s = new String(b);


Tony Morris
Java Q&A (FAQ, Trivia)
omar bili
Ranch Hand

Joined: Aug 13, 2004
Posts: 177
Thx Tony ,can i do it the other way around?
String -> byte[]
coz i need to send the Byte[] as a String and Reconstruct it
from this String
Regards , Omar
Joyce Lee
Ranch Hand

Joined: Jul 11, 2003
Posts: 1392
Yes, you can.



You can refer to String API for more info.

Joyce
[ September 21, 2004: Message edited by: Joyce Lee ]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: can i transform the Byte array to a String ?
 
Similar Threads
object stream
Generating Public and Private keys.
CORBA help!!!!!!!
how to send a byte array
can we store an integer in a byte array