读取raw目录中的文件数据

 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)