question: public void writeDataFile ( String filename ) throws DataFileException { File outFile = new File ( filename ) ; FileOutputStream fos = null ; try { fos = new FileOutputStream ( outFile ) ; } catch ( FileNotFoundException e ) { throw new DataFileException ( "Could not open file " + filename , e ) ; } try { writeDataFile ( fos ) ; } finally { try { if ( fos != null ) fos . close ( ) ; } catch ( IOException e ) { throw new DataFileException ( "Could not close file " + filename + ", may not have written correctly;" , e ) ; } } }
target:  Writes the records in this DataFile object to a text data file