码迷,mamicode.com
首页 > 其他好文 > 详细

获取资源文件

时间:2015-07-04 11:02:35      阅读:114      评论:0      收藏:0      [点我收藏+]

标签:

1.进入assets文件夹

//access to the folder “assets”
AssetManager am = this.getResources().getAssets(); 
InputStream is = am.open("plist/Exposant.plist");

//read file by line
BufferedReader bufferReader = new BufferedReader(newInputStreamReader(is,"UTF-8"));
StringBuilder sb = new StringBuilder();
String line = null; //temporarily save the data
while ((line = bufferReader.readLine()) != null) {
      sb.append(line + "\n");
}

is.close();

 

获取资源文件

标签:

原文地址:http://www.cnblogs.com/qionglouyuyu/p/4620186.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!