|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--upidiff.input.FileInputSource
A generic interface to data sources in a systems filesystem.
| Field Summary | |
private File |
file
The input file. |
private BufferedReader |
reader
Buffered reader object connected with the input file. |
| Constructor Summary | |
FileInputSource(File file)
Creates a new data source associated with a local file. |
|
| Method Summary | |
String |
name()
Returns the absolute path of the input file. |
String |
readLine()
Reads one line from the input file. |
String |
url()
Returns the URL for this input file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private BufferedReader reader
private File file
| Constructor Detail |
public FileInputSource(File file)
throws InputException
file - Input file.
InputException - The file could not be opened for reading.| Method Detail |
public String name()
name in interface InputSourcepublic String url()
url in interface InputSource
public String readLine()
throws InputException
readLine in interface InputSourcenull at end of file.
InputException - The process fails to read from the file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||