permaculture playing cards*
The moose likes I/O and Streams and the fly likes Read file line by line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Read file line by line" Watch "Read file line by line" New topic
Author

Read file line by line

mic ta
Greenhorn

Joined: May 13, 2009
Posts: 28


Is it possible to read files line by line without using != null maybe with a for loop?

Best regards,
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

You will need to check for != null at some time. How else would you find out if you've read the entire file?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Read file line by line
 
Similar Threads
how to go to last line of a file and skipping the rest?
println Vs newLine method
Parsing a text file
Collection with 3 keys
Regarding reading a file in a jsp