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

读取raw目录中的文件数据

时间:2014-08-13 18:06:36      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   文件   数据   div   line   

 1 try {
 2             InputStream is2 = getResources().openRawResource(R.raw.info);
 3             InputStreamReader isr2 = new InputStreamReader(is2, "UTF-8");
 4             BufferedReader bfr2 = new BufferedReader(isr2);
 5             String inString = "";
 6             while ((inString = bfr2.readLine()) != null) {
 7                 Log.i("AAA", inString);
 8             }
 9         } catch (Exception e) {
10             // TODO: handle exception
11         }

 

读取raw目录中的文件数据,布布扣,bubuko.com

读取raw目录中的文件数据

标签:style   blog   color   io   文件   数据   div   line   

原文地址:http://www.cnblogs.com/androidsj/p/3910348.html

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