编辑
复制文件
本文访问次数:0
public static void copyFile(File sourceFile,File destinationFile) Throws IOException{
  if(!sourceFile.exists()){
    return;
  }
  InputStream inputStream = new FileInputStream(sourceFile);
  OutputStream outputStream = new FileOutputStream(destinationFile);
  byte[] buffer = new byte[2048];

  int length = 0;
  while((length = inputStream.read(buffer)) > 0){
    outputStream.write(buffer,0,length);
  }
  inputStream.close();
  outputStream.close();
}
没有任何评论