Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Reading text files and EOF

843789May 21 2009 — edited May 21 2009
I 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 18 2009
Added on May 21 2009
19 comments
473 views