从assets中拷贝from文件到指定目录下
来源:互联网 发布:ubuntu可以做什么 编辑:程序博客网 时间:2024/05/16 09:43
/** * * 从assets中拷贝from文件到to目录下 * **/public void copyFile(Context context, String sourPath, String toPath) {OutputStream output = null;InputStream input = null;try {int read = 0;input = context.getResources().getAssets().open(sourPath);output = new BufferedOutputStream(new FileOutputStream(toPath));byte[] buf = new byte[2048];while ((read = input.read(buf)) != -1) {output.write(buf, 0, read);}} catch (Exception e) {Write.error(e.getMessage());} finally {try {if(output !=null){output.close();}if(input!=null){input.close();}} catch (IOException e) {Write.debug(""+e.getMessage());}}}
0 0
- 从assets中拷贝from文件到指定目录下
- Android从Assets拷贝文件以及文件夹到指定目录
- assets目录下资源拷贝到指定目录
- Android 拷贝assets目录下所有文件及文件夹到指定路径
- 把assets下的指定文件拷贝到sdcard上
- Android复制Assets目录下的文件到指定目录
- assets目录下所有文件拷贝到sd卡
- 从assets拷贝数据库到file目录
- assets目录下的文件拷贝到sd卡目录下
- 拷贝文件到指定目录
- 拷贝文件到指定目录
- Android 读取Assets资源文件或目录,并拷贝到其他目录下
- Android递归拷贝assets资源到指定目录
- android:将assets目录下的文件(文件夹)放置到内存卡指定目录下
- java从一个目录拷贝文件到另一个目录下
- 拷贝一个目录或者文件到指定路径下
- C#中拷贝整个文件夹下的所有文件到指定目录
- assets目录下的zip文件拷贝到sd卡下
- 面试
- 下载以及api地址
- 电子政务领域的大数据解决思路+-+v1.2-胡书能
- Cookie/Session机制详解
- 在eclipse中将android工程打包成apk
- 从assets中拷贝from文件到指定目录下
- 关于vs2013中printf printf_s的错误问题的解决方法
- linux-i386(ubuntu14.0)下编译安装gsoap_2.8.17过程记录
- 黑马程序员----Java中的条件语句
- Image扩展,如何将网络图片显示在自己的程序中
- Android 插件化技术 加载任意未安装apk
- printf调试宏
- solr的logging会出现依赖包缺少解决方案
- application was unable to start correctly (0xc0150002)