Only one line of output with DataInputStream.readLine() in android

by Michael » Mon, 13 Apr 2009 12:08:27 GMT

Sponsored Links
 Hi group,

I use the following code in a java-program on my desktop with sun-
jdk- to read a html file on my webserver. I get several lines
of output as expected. But when I use it in an android-app, the whole
html file is read in only one line.

Where could be the difference between the desktop and android
implementation? Do I have to change something like the encoding or
linebreak character?

URL url = new URL(" http://mysite.intern/test.html" ;);
DataInputStream dis = new DataInputStream(new BufferedInputStream
        while ((s = dis.readLine()) != null){



Other Threads

1. ADC2 Application Entry: Stinky Radio Beta V0.1

Hello All,

Stinky Radio is one of my entries into the Android Challenge 2. I've
just uploaded it into the Android Market as "Stinky Radio Beta" as a
free social application.

It is still not perfect but overall all  the features seem to work OK.

Below is a brief description:

Stinky Radio is a radio by users and for users. Here you can record
your thoughts, comments, ideas, jokes, rants, anything that comes to
mind. Once you make a recording all the users of Stinky Radio can
listen to your recording. Users will also be able to provide comments
on your recordings.


2. Popup list (similar to Spinner)


How can I pop up a list of items much like a Spinner but I don't wan't
the Spinner widgets itself (the drop down item).
I only like to pop up a list of items and select one item, what type
of widget can I use?

Also see my post "Popup a spinner when clicking on a TextView ".
I tried to change "android.R.layout.simple_list_item_1" to get rid of
the Spinner dropdown widget, and only display the list of items, with
no luck.

Many thanks and regards Jonas.


3. Integrating gStreamer to Android

4. Decent AdMob revenue... Anyone?

5. porting OpenMP : problem with using TLS keys from constructor routines

6. Using "droid" in domain names...???

7. CompareEverywhere