question: private static void WriteStringVectorToFile ( Vector inputVec , String fileName ) throws StringVectorToFileException { try { BufferedWriter fileW = new BufferedWriter ( new FileWriter ( fileName ) ) ; int lineNum = 0 ; while ( lineNum < inputVec . size ( ) ) { fileW . write ( ( String ) inputVec . elementAt ( lineNum ) ) ; fileW . newLine ( ) ; lineNum = lineNum + 1 ; } ; fileW . close ( ) ; } catch ( Exception e ) { throw new StringVectorToFileException ( "Could not write file " + fileName ) ; } ; }
target:  METHODS FOR READING AND WRITING FILES 