Esempio n. 1
0
 /**
  * gets the next line in the file
  *
  * @return next line
  */
 public String next() {
   if (pushedBackLine != null) {
     String value = pushedBackLine;
     pushedBackLine = null;
     return value;
   }
   if (done) return null;
   if (nextLine == null) hasNext();
   if (nextLine != null) {
     String result = nextLine;
     nextLine = null;
     lineNumber++;
     if (progress != null) {
       progress.setProgress(position);
     }
     return result;
   }
   return null;
 }