BufferedWriter类是用来将数据写入到缓冲区中。
······首先必须创建FileWriter类对象,再以该对象为参考来创建BufferedWriter类的对象,然后就可以利用此对象调用相应的方法将数据写入缓冲区中。
······注意:缓冲区内的数据最后要用flush()方法将缓冲区清空。
···构造方法:BufferedWriter(Writer out)创建缓冲区字符输出流
··················BufferedWriter(Writer out,int size)创建缓冲区字符输出流,并设置缓冲区大小
···常用方法:write(int c)将单一字符写入缓冲区
··················newline()写入回车换行字符
··················flush()将缓冲区中的数据写入文件中
··················close()关闭流