|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.isti.util.FileProcessor
Class FileProcessor helper class for processing a text input file into a text output file.
Field Summary | |
java.io.BufferedReader |
inputReaderObj
Reader object for input file. |
java.io.PrintWriter |
outputWriterObj
Writer object for output file. |
Constructor Summary | |
FileProcessor(java.lang.String inFName,
java.lang.String outFName)
Creates a file processor object and opens input and output files. |
Method Summary | |
void |
closeInputFile()
Closes the input file. |
void |
closeOutputFile()
Closes the output file. |
java.lang.String |
readNextLine()
Reads and returns the next line of data from the input file. |
void |
writeNextLine(java.lang.String str)
Writes the given line of data to the output file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.io.BufferedReader inputReaderObj
public java.io.PrintWriter outputWriterObj
Constructor Detail |
public FileProcessor(java.lang.String inFName, java.lang.String outFName) throws java.io.FileNotFoundException, java.io.IOException
inFName
- name of input text file to use.outFName
- name of output text file to use.
java.io.FileNotFoundException
- if the input file is not found.
java.io.IOException
- if an I/O error occurs.Method Detail |
public java.lang.String readNextLine() throws java.io.IOException
java.io.IOException
- if an I/O error occurs.public void writeNextLine(java.lang.String str) throws java.io.IOException
str
- a string containing the line of data to be written.
java.io.IOException
- if an I/O error occurs.public void closeInputFile()
public void closeOutputFile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |