question: public static void writeStringToFile ( File file , String data , Charset encoding , boolean append ) throws IOException { OutputStream out = null ; try { out = openOutputStream ( file , append ) ; IOUtils . write ( data , out , encoding ) ; out . close ( ) ; } finally { IOUtils . closeQuietly ( out ) ; } }
target:  Writes a String to a file creating the file if it does not exist.