j2me inputStreamReader problem with 6600
| Wed, 2005-05-25 06:02 | |
|
hi to all
HttpConnection hc = (HttpConnection)Connector.open(url); InputStream is = hc.openInputStream(); hi to all Reader reader = new InputStreamReader(is,"UTF8"); i have a file in url with unicode characters, it sees that inputstreamreader is giving me the error with UTF8 on Series60 nokia 6600 set. without "UTF8" in inputstreamreader it is working good. plz tell me what is wrong with it. with best regards kmsoomro |
|






Forum posts: 3
I was doing something similar with the second variant, it has worked...
Forum posts: 30
for data read or write with the help of UTF you can involve use these steps:
Read data:-
DataInputStream in = new DataInputStream( new ByteArrayInputStream( data ) ); //for read data
read(in)
public void read( DataInputStream in ) throws IOException {
abc = in.readUTF();
}
write data:-
ByteArrayOutputStream out = new ByteArrayOutputStream();
DataOutputStream dout = new DataOutputStream( out );
try {
write( dout, ob ); //write data
}catch(Exception e){}
public void write( DataOutputStream out ) throws IOException {
out.writeUTF(abc);
}
bye!
kksidhu