字符文件复制
FileReader fr =new FileReader("b.txt");//绑定源文件
FileWriter fw= new FileWriter("a.txt");
char[] c= new char[1024];
int len=0;
//循环读取
while((len=fr.read(c))!=-1){
fw.write(c,0,len); }
//关流
fw.close();
fr.close();
2022-10-15 10:45:40
字符文件复制
FileReader fr =new FileReader("b.txt");//绑定源文件
FileWriter fw= new FileWriter("a.txt");
char[] c= new char[1024];
int len=0;
//循环读取
while((len=fr.read(c))!=-1){
fw.write(c,0,len); }
//关流
fw.close();
fr.close();