标签:缓冲 用法 void hello ati stat 字符 puts pre
BufferedWriter基本用法和方法示例
import java.io.*; public class BufferedWriterTest01 { public static void main(String[] args) throws Exception { //创建带有缓冲区的字符输出流 //BufferedWriter bw = new BufferedWriter(new FileWriter("temp04")); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("temp04",true))); bw.write("hello"); bw.newLine(); //写入一个行分隔符 bw.write("java"); bw.flush(); bw.close(); } }
标签:缓冲 用法 void hello ati stat 字符 puts pre
原文地址:http://www.cnblogs.com/bookwed/p/6706367.html