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.
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.