标签:oid new input port void trace ati put ack
import java.io.* ;
public class FileCopy {
public static void main(String[] args) {
String inputFile = "D:/java03/day23/Test.txt" ;
String outputFile = "D:/LX/Test.txt" ;
FileReader r = null;
FileWriter w = null;
try {
r = new FileReader(new File(inputFile));
w = new FileWriter(new File(outputFile));
int b = 0;
while((b = r.read()) != -1) {
w.write(b);
}
w.flush();
}catch(FileNotFoundException ex) {
ex.printStackTrace();
}catch(IOException ex) {
ex.printStackTrace();
}finally {
try{
r.close();
w.close();
}catch(IOException ex) {
ex.printStackTrace();
}
}
System.out.println("复制完成!");
}
}
标签:oid new input port void trace ati put ack
原文地址:http://www.cnblogs.com/xuewuzhijing95hao/p/7120386.html