FileOutputStream s = new FileOutputStream("abc.txt");
OutputStreamWriter w = new OutputStreamWriter(s, "utf-8");
PrintWriter pw = new PrintWriter(w);
pw.println("陈abc");
pw.flush();
pw.close();
如果使用系统默认的编码,可以用FileWriter/FileReader类比较方便.