Reading text files and EOF
843789May 21 2009 — edited May 21 2009I am attempting to read in blocks of data from a text file separated by a blank line. When the BufferedReader hits the first blank line it ends. I retyped the test text file and still cannot get it to continue to read the entire file; just the first block.
fReader = new FileReader( textFile );
bReader = new BufferedReader( fReader );
line = bReader.readLine();
while( line ! = null ){
do stuff;
}
bReader.close()
The format of my textFile is:
100
some name
type 1
type 2
101
some other name
type 1
type 2
Any suggestions would be greatly appreciated.