String
Here are the constructors of the FileOutputStream Class:
Constructors
FileOutputStream(String name) throws FileNotFoundException
Creates an output stream that writes to the file.
FileOutputStream(String name, boolean append) throws FileNotFoundException
Creates an output stream. If append is true append bytes
to the end of the file.
The second constructor opens a disk file for appending.
Since we will always use DataOutputStream
with a FileOutputStream we don't need to
look at the methods (look in your on-line documentation if you want).
Will the following statement work?
DataOutputStream dataOut = new DataOutputStream( "myFile.dat" );