一、实现方法
哎,由于没有会员无法导出HTML只能截图了==(留下贫穷的泪水)==
代码实现
public static void main(String[] args) throws IOException {
FileInputStream fis=new FileInputStream("D:\\Users\\Desktop\\新建文件夹\\a.txt");
FileOutputStream fos=new FileOutputStream("D:\\Users\\Desktop\\a.txt");
int length=0;
byte[] bytes = new byte[1024];
while((length=fis.read(bytes))!=-1){
fos.write(length);
}
fos.close();
fis.close();
}