builder = new StringBuilder("<?xml version="1.0" encoding="UTF-8"?>");
String fileName = currentPath + File.separator + name + ".xml";
BufferedWriter bw = new BufferedWriter(new FileWriter(fileName));
bw.write(new String(builder.toString().getBytes("UTF-8")));
bw.close();
3 回复
@wendal 谢谢回复,但是import java.nio.file.Files;不是这个头文件?
添加回复
请先登陆