Hallo!
Ich möchte eine Textdatei komplett einlesen und den Inhalt in einem String speichern.
Dazu habe ich folgenden Code:
(file.getPath() gibt dem Reader den Pfad an, das funzt alles...)
Die Ausgabe in der Konsole gibt auch FAST den gesamten Inhalt der Textdatei aus, wenn ich den String drucken lasse, aber eben nur fast. Ich habe das mit verschiedenen Textfiles probiert, jedes mal fehlt gegen Ende ein Stück.
Noch komischer ist es, dass bei einigen Textfiles Lücken (Auslassungen) gelassen werden.
Beispiel:
Originaltext:
From: ch981@cleveland.Freenet.Edu (Tony Alicea)
Subject: Southern Baptist Convention & Freemasonry
Organization: Case Western Reserve University, Cleveland, OH (USA)
Lines: 51
Reply-To: ch981@cleveland.Freenet.Edu (Tony Alicea)
NNTP-Posting-Host: hela.ins.cwru.edu
With the Southern Baptist Convention convening this June to consider
the charges that Freemasonry is incompatible with christianity, I thought
the following quotes by Mr. James Holly, the Anti-Masonic Flag Carrier,
would amuse you all...
The following passages are exact quotes from "The Southern
Baptist Convention and Freemasonry" by James L. Holly, M.D., President
of Mission and Ministry To Men, Inc., 550 N 10th St., Beaumont, TX
77706.
The inside cover of the book states: "Mission & Ministry to Men,
Inc. hereby grants permission for the reproduction of part or all of
this booklet with two provisions: one, the material is not changed and
two, the source is identified." I have followed these provisions.
"Freemasonry is one of the allies of the Devil" Page iv.
"The issue here is not moderate or conservative, the issue is God
and the Devil" Page vi."
"It is worthwhile to remember that the formulators of public
school education in America were Freemasons" Page 29.
"Jesus Christ never commanded toleration as a motive for His
disciples, and toleration is the antithesis of the Christian message."
Page 30.
"The central dynamic of the Freemason drive for world unity
through fraternity, liberty and equality is toleration. This is seen
in the writings of the 'great' writers of Freemasonry". Page 31.
"He [Jesus Christ] established the most sectarian of all possible
faiths." Page 37.
"For narrowness and sectarianism, there is no equal to the Lord
Jesus Christ". Page 40.
"What seems so right in the interest of toleration and its
cousins-liberty, equality and fraternity-is actually one of the
subtlest lies of the 'father of lies.'" Page 40.
"The Southern Baptist Convention has many churches which were
founded in the Lodge and which have corner stones dedicated by the
Lodge. Each of these churches should hold public ceremonies of
repentance and of praying the blood and the Name of the Lord Jesus
Christ over the church and renouncing the oaths taken at the
dedication of the church and/or building." Page 53-54.
Tony
Konsolenausgabe in Eclipse:
Subject: Southern Baptist Convention & FreemasonryLines: 51NNTP-Posting-Host: hela.ins.cwru.eduthe charges that Freemasonry is incompatible with christianity, I thoughtwould amuse you all... The following passages are exact quotes from "The Southern of Mission and Ministry To Men, Inc., 550 N 10th St., Beaumont, TX Inc. hereby grants permission for the reproduction of part or all of two, the source is identified." I have followed these provisions. "Freemasonry is one of the allies of the Devil" Page iv. "The issue here is not moderate or conservative, the issue is God school education in America were Freemasons" Page 29. "Jesus Christ never commanded toleration as a motive for His Page 30. "The central dynamic of the Freemason drive for world unity in the writings of the 'great' writers of Freemasonry". Page 31. "He [Jesus Christ] established the most sectarian of all possible Jesus Christ". Page 40. "What seems so right in the interest of toleration and its subtlest lies of the 'father of lies.'" Page 40. "The Southern Baptist Convention has many churches which were Lodge. Each of these churches should hold public ceremonies of Christ over the church and renouncing the oaths taken at the Tony
Man sieht, dass zwischen "taken at the" und "Tony" etwas weggelassen wurde.
Was kann ich tun, um dieses Problem zu lösen?
Vielen Dank für Ihre Hilfe
Ralf
Ich möchte eine Textdatei komplett einlesen und den Inhalt in einem String speichern.
Dazu habe ich folgenden Code:
Java:
BufferedReader br = new BufferedReader(new FileReader(file.getPath()));
String filecontent = "";
while (br.readLine() != null) {
filecontent += br.readLine();
}
System.out.println(filecontent);
(file.getPath() gibt dem Reader den Pfad an, das funzt alles...)
Die Ausgabe in der Konsole gibt auch FAST den gesamten Inhalt der Textdatei aus, wenn ich den String drucken lasse, aber eben nur fast. Ich habe das mit verschiedenen Textfiles probiert, jedes mal fehlt gegen Ende ein Stück.
Noch komischer ist es, dass bei einigen Textfiles Lücken (Auslassungen) gelassen werden.
Beispiel:
Originaltext:
From: ch981@cleveland.Freenet.Edu (Tony Alicea)
Subject: Southern Baptist Convention & Freemasonry
Organization: Case Western Reserve University, Cleveland, OH (USA)
Lines: 51
Reply-To: ch981@cleveland.Freenet.Edu (Tony Alicea)
NNTP-Posting-Host: hela.ins.cwru.edu
With the Southern Baptist Convention convening this June to consider
the charges that Freemasonry is incompatible with christianity, I thought
the following quotes by Mr. James Holly, the Anti-Masonic Flag Carrier,
would amuse you all...
The following passages are exact quotes from "The Southern
Baptist Convention and Freemasonry" by James L. Holly, M.D., President
of Mission and Ministry To Men, Inc., 550 N 10th St., Beaumont, TX
77706.
The inside cover of the book states: "Mission & Ministry to Men,
Inc. hereby grants permission for the reproduction of part or all of
this booklet with two provisions: one, the material is not changed and
two, the source is identified." I have followed these provisions.
"Freemasonry is one of the allies of the Devil" Page iv.
"The issue here is not moderate or conservative, the issue is God
and the Devil" Page vi."
"It is worthwhile to remember that the formulators of public
school education in America were Freemasons" Page 29.
"Jesus Christ never commanded toleration as a motive for His
disciples, and toleration is the antithesis of the Christian message."
Page 30.
"The central dynamic of the Freemason drive for world unity
through fraternity, liberty and equality is toleration. This is seen
in the writings of the 'great' writers of Freemasonry". Page 31.
"He [Jesus Christ] established the most sectarian of all possible
faiths." Page 37.
"For narrowness and sectarianism, there is no equal to the Lord
Jesus Christ". Page 40.
"What seems so right in the interest of toleration and its
cousins-liberty, equality and fraternity-is actually one of the
subtlest lies of the 'father of lies.'" Page 40.
"The Southern Baptist Convention has many churches which were
founded in the Lodge and which have corner stones dedicated by the
Lodge. Each of these churches should hold public ceremonies of
repentance and of praying the blood and the Name of the Lord Jesus
Christ over the church and renouncing the oaths taken at the
dedication of the church and/or building." Page 53-54.
Tony
Konsolenausgabe in Eclipse:
Subject: Southern Baptist Convention & FreemasonryLines: 51NNTP-Posting-Host: hela.ins.cwru.eduthe charges that Freemasonry is incompatible with christianity, I thoughtwould amuse you all... The following passages are exact quotes from "The Southern of Mission and Ministry To Men, Inc., 550 N 10th St., Beaumont, TX Inc. hereby grants permission for the reproduction of part or all of two, the source is identified." I have followed these provisions. "Freemasonry is one of the allies of the Devil" Page iv. "The issue here is not moderate or conservative, the issue is God school education in America were Freemasons" Page 29. "Jesus Christ never commanded toleration as a motive for His Page 30. "The central dynamic of the Freemason drive for world unity in the writings of the 'great' writers of Freemasonry". Page 31. "He [Jesus Christ] established the most sectarian of all possible Jesus Christ". Page 40. "What seems so right in the interest of toleration and its subtlest lies of the 'father of lies.'" Page 40. "The Southern Baptist Convention has many churches which were Lodge. Each of these churches should hold public ceremonies of Christ over the church and renouncing the oaths taken at the Tony
Man sieht, dass zwischen "taken at the" und "Tony" etwas weggelassen wurde.
Was kann ich tun, um dieses Problem zu lösen?
Vielen Dank für Ihre Hilfe
Ralf