Hello
I wrote this Demo code in netbeans for j2me app. this code recieve some string from servlet.
The problem is I couldn't recieve complete string and I lost Some words in recieved text . the code is here .
Please do your Best.
DataInputStream is =(DataInputStream)c.openDataInputStream();
InputStreamReader input = new InputStreamReader(is,"UTF-8");
int ch;
sb = new StringBuffer();
while ((ch = input.read()) != -1) {
sb.append((char)ch);
}
showAlert(sb.toString());
is.close();
c.close();
} catch (Exception e) {
showAlert(e.getMessage());
}

Reply With Quote



