users@glassfish.java.net

Re: Invalid Chunk Header

From: <glassfish_at_javadesktop.org>
Date: Sat, 17 Apr 2010 20:53:56 PDT

Hi Alexey,

I manage to solve the error. Apparently is my code that is causing the problem. Not sure why this problem only surface on HTC HD2.

DataOutputStream os = (DataOutputStream)c.openDataOutputStream();
os.writeUTF(info);
os.flush();
os.close();

The above code is called when i am trying to send info to the server. The line that is causing the problem is os.flush(). My program works like a charm when i commented that out. Yup. Not really sure why it works after i commented that line out. I got to know this from another forum where that guy advice me to comment it out as os.flush(); behaves differently on different mobile devices.

Thanks for your help. Really appreciate it. :)
[Message sent by forum member 'is_true']

http://forums.java.net/jive/thread.jspa?messageID=397595