private void writeStringToFile ( String str , File file ) throws IOException { if ( ! file . exists ( ) && file . isDirectory ( ) ) { return ; } try ( BufferedWriter bw = new BufferedWriter ( WriterFactory . newWriter ( file , this . encoding ) ) ) { bw . write ( str ) ; } }
Write the given string to a file .