Hi,
I use JSON as an interface and my code works fine on 2.2 devices but fails
on motorola 2.1 devices
The reason is that not the whole JSON file is downloaded, but only some
(always the same) part and than it stops.


URL url = new URL("http://www.somelink";);
picCounter = 0;
URLConnection ucon = url.openConnection();
InputStream is = ucon.getInputStream();
BufferedInputStream bis = new BufferedInputStream(is);
ByteArrayBuffer baf = new ByteArrayBuffer(50);
int current = 0;
while ((current = bis.read()) != -1) {
baf.append((byte) current);
}
                // breaks in 2.1 but works in 2.2
String text = new String(baf.toByteArray());

Is there an IO issue in 2.1?



Thanks,
Stephan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to