package org.demo;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
public class IOTest {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
//拷贝文件
File file=new File("D:\cc.txt");
FileInputStream fis=new FileInputStream(file);
FileOutputStream fos=new FileOutputStream("D:\Copycc.txt");
byte b[]=new byte[(int)file.length()];
fis.read(b);
fos.write(b);
System.out.println("copy成功");
}
}



