热门

最新

红包

立Flag

投票

同城

我的

发布
m0_60992290
心对元&鑫鑫
3 年前
truem0_60992290

将文件夹里的视频传到另一个文件夹中
package untitled1.Deng;

import java.io.*;

public class Han {
public static void main(String[] args) {
try (FileInputStream is=new FileInputStream("D:\\FileHu\\We.mp4");
BufferedInputStream is1=new BufferedInputStream(is);
FileOutputStream os=new FileOutputStream("D:\\FileHu\\Wang.mp4");
BufferedOutputStream os1=new BufferedOutputStream(os);
){
// 用捅进行分装
byte[] bytes=new byte[1024];
int i;
while ((i=is1.read(bytes))!=-1){
os1.write(bytes,0,i);
}

} catch (Exception e) {
e.printStackTrace();
}
}
}

CSDN App 扫码分享
分享
评论
3
打赏
  • 复制链接
  • 举报
下一条:
放弃悲伤,珍惜现在.
立即登录