String filePath = "指定文件写入路径"; // 例如:D:\\files\\test.txt
BufferedWriter bw= new BufferedWriter (new OutputStreamWriter (new FileOutputStream (filePath,true),"UTF-8"));
bw.write("Hello China");