如何在资源/原材料宣布写入文件? [英] How to write in a file declared in res/raw?

查看:114
本文介绍了如何在资源/原材料宣布写入文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有存储在RES /原始的文件,我想知道如何WITE到该文件中。 我想getResources但它返回一个InputStream。

I have a file stored in res/raw, and I would like to know how to wite into that file. I tried getResources but it returns an inputStream.

推荐答案

不可能的。如果您需要将资产复制到设备上存储的文件中的资产目录。然后使用AssetManager流中,并复制资产,所以你可以把它写到光盘或应用程序缓存。

Not possible. If you need to copy an asset to the device store the file in the assets directory. Then use the AssetManager to stream in and copy the asset so you can write it to disc or application cache.

这篇关于如何在资源/原材料宣布写入文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆