• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can I tell the end of file?

 
Bod Toki
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Please if i am reading from a file, how would i tell when the end of file is reached?

(I'm actually using a BufferedReader wrapped around a FileReader to read from a text file- but i wouldn't mind any other file reading solutions)

Thanks.
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When using a BufferedReader you can do it this way:

 
Bod Toki
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. It worked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic