Commons-io将内容增添至文件末尾

Commons-io将内容添加至文件末尾public void append_to_end(){File file new File(append.txt)try {F

Commons-io将内容添加至文件末尾

public void append_to_end(){File file = new File("append.txt");try {FileUtils.write(file, "你需要添加的内容\r\n", true);FileUtils.write(file, "你需要添加的内容\r\n", "UTF-8", true);} catch (IOException e) {e.printStackTrace();}}