public static class FileOps.FileLineIterator
extends java.lang.Object
implements java.util.Iterator<java.lang.String>, java.lang.Iterable<java.lang.String>
Constructor and Description |
---|
FileOps.FileLineIterator(java.io.File file)
Initializes iterating over the lines of the given file.
|
FileOps.FileLineIterator(java.lang.String filename)
Initializes iterating over the lines of the file with the given filename.
|
public FileOps.FileLineIterator(java.io.File file) throws java.io.FileNotFoundException
file
- the file to iterate.java.io.FileNotFoundException
- if the file does not exist.public FileOps.FileLineIterator(java.lang.String filename) throws java.io.FileNotFoundException
filename
- the relative or absolute filename of the file.java.io.FileNotFoundException
- if the file does not exist.public java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>
public boolean hasNext()
hasNext
in interface java.util.Iterator<java.lang.String>
public java.lang.String next()
next
in interface java.util.Iterator<java.lang.String>
public void remove()
remove
in interface java.util.Iterator<java.lang.String>