代码如下:
public static BufferedWriter createFileWriter(String name) throws FileNotFoundException, UnsupportedEncodingException {
FileOutputStream outputStream = new FileOutputStream(name);
OutputStreamWriter outputWriter = new OutputStreamWriter(outputStream, "utf-8");
BufferedWriter writer = new BufferedWriter(outputWriter);
return writer;
}
一样的小丝,