|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.avian.util.BirdOutputFile
public class BirdOutputFile
A utility object that manages all of the messy details of opening and closing and output file that will hold the output from a bird. The assumption is that when processing is completed on an object, its results are written out to some kind of long term storage. If, for example, in a billing run, one customer's invoice has completed prepararation, it would be written to an output file so it could be sent to a printer. If you wanted to write to a database, however, you would need to extend this object so the open, write, and close methods perform the necessary interactions with the selected database manager.
Constructor Summary | |
---|---|
BirdOutputFile(java.lang.String fileName)
The only constructor that is defined for this helper object. |
Method Summary | |
---|---|
void |
close()
Closes the output file when the current bird does a stop or Return to Egg. |
java.lang.String |
getFileName()
Returns the fileName that is currently set in this helper object. |
void |
open()
Opens the fileName that was set when this object was created. |
void |
writeOutput(java.lang.String outputString)
Writes the actual output to the file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BirdOutputFile(java.lang.String fileName)
fileName
- String that contains the path and fileName to open and write toMethod Detail |
---|
public java.lang.String getFileName()
public void open()
public void writeOutput(java.lang.String outputString)
outputString
- String that will be written to the output file. This method
does not format or modify the output String in any way.public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |