import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
public class Fashi {
public static void main(String[] args) throws Exception {
//选择你要读取的文件
FileInputStream fis=new FileInputStream("C:\\Users\\Desktop\\su.txt");
//选择你要存放的文件
FileOutputStream fos=new FileOutputStream("C:\\Users\\Desktop\\su2.txt");
//byte[] buf=new byte[1024];
// BufferedReader bufr=new BufferedReader(buf);
int len;
while((len=fis.read())!=-1){
fos.write(len);
}
fis.close();
fos.close();
}
}
Java复制文本文件到其他文本文件中
最新推荐文章于 2021-02-15 17:06:10 发布