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.
私は次の種類のテキストを持っています:
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.
私は次のように行を読んでいます:
while(buffer.readline() != null){
}
しかし、問題は、改行の前までの文字列の行を考慮していることです。しかし、文字列が で終わる行を考慮したいと思います.
。どうすればいいですか?