public PrintWriter openTrainLogFile ( ) { String filename = modelDir + File . separator + trainLogFile ; PrintWriter fout = null ; try { fout = new PrintWriter ( new OutputStreamWriter ( ( new FileOutputStream ( filename ) ) , "UTF-8" ) ) ; } catch ( IOException e ) { System . out . println ( e . toString ( ) ) ; return null ; } return fout ; }
Open train log file .