1BufferedReader reader = null;
2try {
3 reader = new BufferedReader(
4 new InputStreamReader(getAssets().open("filename.txt"), "UTF-8"));
5
6 // do reading, usually loop until end of file reading
7 String mLine;
8 while ((mLine = reader.readLine()) != null) {
9 //process line
10 ...
11 }
12} catch (IOException e) {
13 //log the exception
14} finally {
15 if (reader != null) {
16 try {
17 reader.close();
18 } catch (IOException e) {
19 //log the exception
20 }
21 }
22}