IO把数据移植简化

package io;

import java.io.*;
public class CopTe {


public static void main(String []args){
FileReader f =null;
FileWriter fw =null;


try{
f= new FileReader("D:\\A\\rund.text");
fw =new FileWriter("C:\\B\\cp.text");
int ch =0;
while((ch=f.read())!=-1){
fw.write(ch);
}
}catch(IOException e){
System.out.println(e.toString());
}finally{
if(fw!=null){
try{
fw.close();
}catch(IOException e){
   System.out.println(e.toString());
}
if(f!=null){
try{
f.close();
}catch(IOException e){
System.out.println(e.toString());
}
}
}
}
}
}

你可能感兴趣的:(C++,c,C#,F#)