Hi,

See sample code below

url = "http://www.something.com/getdata.php?param1=x&param2=y&" //
m_HttpConn = (HttpConnection) Connector.open(url);
setRequestHeaders(m_HttpConn);
....
m_IStream = new DataInputStream(m_HttpConn.openInputStream());

... // start read process
...

Here's the responsed data format
[info1:value1][newline][info2:value2][newline][png binary data][newline].....

info1 = contains ID for PNG
info2 = contains the filesize of PNG
Example
ID:001
PNGSZ:1045
[PNG Binary data]
ID:002
PNGSZ:645
[PNG Binary data]
....

Now here's the problem
while reading from DataInputStream it return -1 (no more data available) On Emulator it work without any problem. Looking within the data, it stops reading when it first encountered 0x00 0x00 in the PNG binary data.
One more thing, it tried saving the data into one file then upload it to a webserver. I access the file directly, read error did not occur.

I have also tried the same code on Sanyo SCP8100 and it worked.

Device: Nokia 3650
Build: v2.50 2/13/2002 NHL-8
MIDP: 1.0
Dev-IDE: Sun One Studio 4 Mobile update 1 and JBuilder 8 with MobileSet 3
SDK: Series 60 MIDP SDK for Symbian OS v 1.2

I think its a phone specific bug.


Any ideas why the bug occurs?