The FileUtils.writeStringToFile(fileName, text) function of Apache Commons I/O overwrites previous text in a file. I would like to append data to my file. Is th
FileUtils.writeStringToFile(fileName, text)
in version 2.5 you need to pass one extra parameter i.e, encoding.
FileUtils.writeStringToFile(file, "line to append", "UTF-8", true);