Monday, August 5, 2013

Reading text file from assets folder

AssetManager assetManager=getAssets();
InputStreamReader reader=new InputStreamReader(assetManager.open(filename),"UTF-8");
BufferedReader br=new BufferedReader(reader);

   

String line;
  while ((line = reader.readLine()) != null) {
           stringBuilder.append(line);
  }
 inputStream.close();

0 comments:

Post a Comment