从FileWriter创建BufferedWriter
/**NowJava.com**/ import java.io.BufferedWriter; import java.io.FileWriter; public class testfilecreation { public static void main(String[] args) { try { FileWriter fstream = new FileWriter("d:\\out.txt"); BufferedWriter bufferedWriter = new BufferedWriter(fstream); bufferedWriter.write("Hello Java"); //Close the output stream /** * 时 代 J a v a 公 众 号 - N o w J a v a . c o m 提 供 **/ bufferedWriter.close(); }catch (