toUNICODE
Hi, I'm trying to convert mail message content (using javamail) to UNICODE. The bytes printed here are not UNICODE. What is wrong?
InputStream is=msg.getInputStream();
ByteArrayOutputStream baos=new ByteArrayOutputStream();
int b;
while ((b=is.read())!=-1){
baos.write(b);
}
baos.flush();
OutputStreamWriter osw=new OutputStreamWriter(baos,"UNICODE");
byte[] bb=baos.toByteArray();
for (int i=0;i<bb.length;i++){
System.out.println(bb[i]);
}
Naor>

