|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsem.util.FileReader
public class FileReader
Class for simplifying file reading. Given an input file, it will read it line by line. Given a directory, it will iterate through all the lines in all the files in that directory.
Constructor Summary | |
---|---|
FileReader(java.lang.String inputPath)
Constructs a new FileReader. |
|
FileReader(java.lang.String inputPath,
java.lang.String fileAddendum)
Constructs a new FileReader. |
Method Summary | |
---|---|
void |
close()
Close the FileReader. |
boolean |
hasNext()
Check whether the reader has any lines left. |
static java.util.ArrayList<java.io.File> |
listFileRec(java.io.File file)
Recursively find all files that are contained in that directory. |
static void |
main(java.lang.String[] args)
Example use case. |
java.lang.String |
next()
Get the next line. |
void |
reset()
Reset the FileReader. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileReader(java.lang.String inputPath)
inputPath
- Input path.public FileReader(java.lang.String inputPath, java.lang.String fileAddendum)
inputPath
- Input path.fileAddendum
- String to be appended at the end of each file.Method Detail |
---|
public static java.util.ArrayList<java.io.File> listFileRec(java.io.File file)
file
- Main file.
public void reset()
public void close()
public java.lang.String next()
public boolean hasNext()
public static void main(java.lang.String[] args)
args
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |