different behaviour of url.openstream() on emulator and phys

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

different behaviour of url.openstream() on emulator and phys

Postby micm » Sat Apr 11, 2009 8:45 am

Hi,

when I execute the following code in the emulator the html code of the website is read in line by line as expected, but in on the physical android device the EOL is somehow missed and several, sometimes all, lines are read into one.
Any idea how I can get the "correct" behaviour also on the physical device?

URL url = new URL("http://www.spiegel.de/"); //just an example
System.out.println(url);
DataInputStream dis = new DataInputStream(new BufferedInputStream
(url.openStream()));
while ((s = dis.readLine()) != null){
System.out.println(s);
}

Thanks for any ideas,
Michael
micm
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Apr 11, 2009 7:28 am

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 1 guest