/*
* source 源文件绝对路径
* destination 目的文件绝对路径
* */
public static void fileCopy(String source,String destination) throws IOException {
FileInputStream fileInputStream = new FileInputStream(source);
FileOutputStream output = new FileOutputStream(destination);
byte[] buffer = new byte[2048];
int len;
while((len = fileInputStream.read(buffer)) > 0) {
output.write(buffer,0,len);
}
fileInputStream.close();
output.close();
}
05-30
911
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-11
7411
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-29
976
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交