字符文件复制
1 FileReader fr =new FileReader("b.txt");//绑定源文件 2 FileWriter fw= new FileWriter("a.txt"); 3 char[] c= new char[1024]; 4 int len=0; 5 //循环读取 6 while((len=fr.read(c))!=-1){ 7 fw.write(c,0,len); 8 9 } 10 //关流 11 fw.close(); 12 fr.close();
标签:class gpo log [] 绑定 pos writer col read
字符文件复制
1 FileReader fr =new FileReader("b.txt");//绑定源文件 2 FileWriter fw= new FileWriter("a.txt"); 3 char[] c= new char[1024]; 4 int len=0; 5 //循环读取 6 while((len=fr.read(c))!=-1){ 7 fw.write(c,0,len); 8 9 } 10 //关流 11 fw.close(); 12 fr.close();
标签:class gpo log [] 绑定 pos writer col read
原文地址:http://www.cnblogs.com/xuzhaocai/p/8064957.html