package com.gg.demo;
import java.io.*;
public class InPutStreamDemo {
public static void main(String [] args) throws IOException {
File file =new File("d:/123.txt");
InputStream is=new FileInputStream(file);
OutputStream os=new FileOutputStream("d:1234.txt");
byte [] buf =new byte[(int) file.length()];
is.read(buf);
os.write(buf);
is.close();
os.close();
System.out.println("finish");
}
}
IO流,将一个文件从c盘复制到另一个盘中
最新推荐文章于 2022-04-10 16:58:29 发布