// 拷贝文件
private static void copyFile(File source, File file) {
// 创建流对象
InputStream is = null;
OutputStream os = null;
try {
is = new FileInputStream(source);
os = new FileOutputStream(file);
// 基本读写操作
byte[] bys = new byte[1024];
int len = 0;
while ((len = is.read(bys)) != -1) {
os.write(bys, 0, len);
}
} catch(IOException e){
throw new RuntimeException("复制失败");
}finally {
try{
if (os != null) {
os.close();
}
}catch(IOException e){
}
try{
if (is != null) {
is.close();
}
}catch(IOException e){