标签:cep string test public buffered 释放 vat 资源 str
//测试 字符写出流
public class Test4_Writer {
public static void main(String[] args) throws IOException {
FW();//FileWriter写出流
// BW();//TODO BufferedWriter写出流
}
//FileWriter写出流
private static void FW() throws IOException {
//1,创建对象
// Writer out = new FileWriter("D:\\iotest\\1.txt");//默认就是数据覆盖模式
Writer out = new FileWriter("D:\\iotest\\1.txt",true);//数据追加模式
// Writer out = new FileWriter( new File("D:\\iotest\\1.txt") );
//2,开始写出
out.write(97);
out.write(97);
out.write(97);
out.write("大家好!!!");
//3,释放资源
out.close();
}
}
标签:cep string test public buffered 释放 vat 资源 str
原文地址:https://www.cnblogs.com/muchen-123/p/13337371.html