FileInputStream fis = new FileInputStream("E:\\Java基础资料\\a.txt");
FileOutputStream fos = new FileOutputStream("E:\\Java基础资料\\b.txt" );
while (true) {
int b = fis.read();
if (b == -1)
break;
fos.write(b);
}
fos.close();
fis.close();
Java基础 文件拷贝的基本代码
发布时间 2023-10-23 15:26:33作者: 嘎嘎鸭2