String
Here are the constructors for FileOutputStream :
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.
Use FileOutputStream to open a file,
but use the methods of DataOutputStream for sending data into the stream.
Will the following statement work?
DataOutputStream dataOut = new DataOutputStream( "myFile.dat" );