登录
首页 » java » IO流文件复制

IO流文件复制

于 2023-05-13 发布 文件大小:3.26 kB
0 129
下载积分: 2 下载次数: 1

代码说明:

import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream; public class FileStreamDemo { public static void main(String[] args) { writeDate(); } private static void copy() { byte[] b= new byte[1000]; FileInputStream fs=null; FileOutputStream fo=null; try { fs = new FileInputStream("e:1.qsv"); fo = new FileOutputStream("e:11.qsv"); while((fs.read(b))!=-1){ fo.write(b); } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); }finally{ try { fo.close(); fs.close(); } catch (IOException e) { e.printStackTrace(); } } }

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 包含很多java文章,论坛里的文章,及技巧
    包含很多java文章,论坛里的文章,及技巧-Article contains a lot of java, the Forum
    2023-06-23 18:00:03下载
    积分:1
  • Java-programming-thought
    Java程序设计语言经典教程,从理解Java设计思想的层面上来学习Java编程。(Java programming language classic handbook, from the level of understanding of the design ideas come to learn Java Java programming.)
    2013-12-13 01:02:47下载
    积分:1
  • android-adhoc
    本项目实现stm32+sdio wifi+OV2640模组图像传输;上传部分为android端连接并显示图像的代码(The project to achieve stm32+ sdio wifi+ OV2640 module image transmission upload part of the android-side connection and display the VIDEO of the code.)
    2020-11-16 15:59:41下载
    积分:1
  • javaweb音乐网站
    这是java写的一个音乐网站,欢迎大家指教
    2022-08-25 09:55:18下载
    积分:1
  • Snake game java programming algorithm suitable for beginners to understand! ~
    java贪吃蛇游戏编程,适合初学者对算法的了解!~-Snake game java programming algorithm suitable for beginners to understand! ~
    2022-01-28 22:03:20下载
    积分:1
  • 在Tomcat中使用Yale CAS实现单点登陆(SSO)
    在Tomcat中使用Yale CAS实现单点登陆(SSO)-In the use of Tomcat realize Yale CAS single-point landing (SSO)
    2022-08-02 13:16:28下载
    积分:1
  • 小游戏 数字连连看
    一款基于Java的小游戏,老师布置的小任务!!!
    2023-02-23 13:05:03下载
    积分:1
  • jdic
    很好的桌面开发程序的jar包 可以实现各种文件关联 开发者可以开发自己的桌面程序(Good desktop development program jar package can achieve a variety of file association developers can develop their own desktop applications)
    2013-07-03 12:42:16下载
    积分:1
  • android txt阅读 例子源码
    android txt阅读 例子源码
    2015-04-06下载
    积分:1
  • Spring发邮件
    Spring发邮件 -Spring e-mail
    2023-09-03 00:55:04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载