title: Checking for EOF and skipping lines in java
body: <p>I am trying to read from a text file and use the input to create multiple different objects. I obviously don't want to keep reading after the file is empty, so I have a method isEmpty() which reads up until the point I want in the file and then reads the next line and tests for null.</p>
  
  <p>The problem is that if it's not empty it then goes onto read the file...but from the NEXT line. In other words, I read the first line to test but then can't read it again.</p>
  
  <p>My current idea is to create a dummy object to test this on and use an identical, second object to actually use. But this seems kind of wasteful and I think there must be a better way....thanks everyone!</p>
  
  <p>Notes: 
  The method which reads is not the same method that is checking for empty.
  The same bufferedReader is being used throughout the object's methods because otherwise I will need to ask the user to enter the file name again, which I don't want to do. </p>