话不多说上源码
public
void copy(String srcpath
, String dstpath
) throws IOException
{
File files
= new
File(srcpath
);
File filed
= new
File(dstpath
);
FileInputStream fis
= new
FileInputStream(srcpath
);
FileOutputStream fos
= new
FileOutputStream(dstpath
);
byte
[] b
= new byte
[1024];
int len
= 0;
while ((len
= (fis
.read(b
))) != -1) {
fos
.write(b
, 0, len
);
}
fis
.close();
fos
.close();
}
转载请注明原文地址: https://lol.8miu.com/read-23107.html