Lesen bufferedReader Zeile in

Aus der javadoc

public String readLine()
            throws IOException

Read a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed. 

Habe ich folgenden text :

Now the earth was formless and empty.  Darkness was on the surface
of the deep.  God's Spirit was hovering over the surface
of the waters.

Lese ich Zeilen wie:

 while(buffer.readline() != null){
       }

Aber, das problem ist, es erwägt, eine Linie für den string bis vor dem newline.Aber ich möchte zu Bedenken Zeile, wenn string endet mit .. Wie sollte ich das tun?

InformationsquelleAutor thetna | 2012-04-29
Schreibe einen Kommentar