摘要: assets文件夹里面的文件都是保持原始的文件格式,需要用AssetManager以字节流的形式读取文件。 1. 先在Activity里面调用getAssets() 来获取AssetManager引用。 2. 再用AssetManager的open(String fileName, int accessMode) 方法则指定读取的文件以及访问模式就能得到输入流InputStream。 3. 然后就是用已经open file 的inputStream读取文件,读取完成后记得inputStream.close() 。 4.调用AssetManager.close() 关闭AssetManager。 阅读全文
posted @ 2012-03-08 10:03 大气象 阅读(172066) 评论(13) 推荐(11) 编辑
http://www.tianqiweiqi.com