62,621
社区成员
发帖
与我相关
我的任务
分享class Copy1 {
static void copy()throws Exception {
FileInputStream fi =
new FileInputStream("fists.mp3");
FileOutputStream fo =
new FileOutputStream("aa.mp3");
byte [] by = new byte [1024*100]; //new byte [657832];
int num = 0;
while ((num=fi.read(by))!=-1) {
fo.write(by,0,num);
fo.flush();
}
fo.close();
fi.close();
}
}