/**
* 文件复制
* @author YOLANDA
* @param srcFile 原路径
* @param destFile 目标路径
* @return
*/
public static boolean copy(String srcFile, String destFile) {
try {
FileInputStream in = new FileInputStream(srcFile);
FileOutputStream out = new FileOutputStream(destFile);
byte[] bytes = new byte[1024];
int c;
while ((c = in.read(bytes)) != -1) {
out.write(bytes, 0, c);
}
in.close();
out.flush();
out.close();
return true;
} catch (Exception e) {
Log.i("发生错误:" + e.getMessage());
return false;
}
}

更多相关文章

  1. Android(安卓)SDK更新的问题
  2. android mapView
  3. 升级android sdk时A folder failed to be renamed or moved 错误
  4. Android(安卓)keytool 生成证书MD5指纹
  5. [zz http://www.cnblogs.com/oldfeel/archive/2012/05/15/250129
  6. Android: Attaching Sources to Libraries in Eclipse
  7. 升级android sdk时A folder failed to be renamed or moved 错误
  8. Error:In declare-styleable FontFamilyFont, unable to find at
  9. Eclpise导入android SDK自带的API demos

随机推荐

  1. ConfigurationTest以及横竖屏切换及2.3与
  2. Android中的Uri和ContentProvider
  3. 关于ScrollView嵌套RecyclerView时Recycl
  4. App版本更新时对SQLite数据库升级或者降
  5. Android(安卓)5种倒计时的实现
  6. Android(安卓)JNI开发进阶篇
  7. android_qqApk反编译/android小工具/ddms
  8. 简析Android多种AlertDialog对话框效果
  9. Android各版本API与NDK对照表,发布时间与
  10. Android(安卓)ListView(加载不同布局)嵌套G