标签:txt write 资源 int pre writer 缓冲流 div 输出流
BufferedReader br = new BufferedReader(new FileReader("readme.txt"));
BufferedWriter bw = new BufferedWriter(new FileWriter("dest.txt"));
char[] chs = new char[2048]; int len; while((len = br.read(chs)) != -1) { bw.write(chs); }
bw.flush();//记得刷新缓冲流
br.close();
bw.close();
标签:txt write 资源 int pre writer 缓冲流 div 输出流
原文地址:https://www.cnblogs.com/sunbr/p/11619773.html