标签:close red ddd txt line exce ace ring dwr
import java.io.*;
//复制文件
public class BufferStream1 {
public static void main(String[] args) throws IOException {
BufferedReader bufferedReader = new BufferedReader(new FileReader("E:\\Workpace\\ccc.txt"));
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter("E:\\Workpace\\ddd.txt"));
// char[] chars = new char[1024];
// int len;
// while ((len = bufferedReader.read(chars)) != -1){
// bufferedWriter.write(new String(chars,0,len));
// }
String line;
while((line = bufferedReader.readLine()) != null){
bufferedWriter.write(line);
bufferedWriter.newLine();
bufferedWriter.flush();
}
bufferedReader.close();
bufferedWriter.close();
}
}
标签:close red ddd txt line exce ace ring dwr
原文地址:https://www.cnblogs.com/codegzy/p/14723970.html