public class Demo {
public static void main(String[] args) throws IOException {
FileInputStream in = new FileInputStream("D:\\aaa\\cxy.bmp");
FileOutputStream out = new FileOutputStream("cxy.bmp");
int n = 0;
while((n = in.read()) != -1){
out.write(n);
}
//释放资源
in.close();
out.close();
System.out.println("复制完毕");
}
} |
|