Java tutorial
//package com.java2s; //License from project: Apache License import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import android.content.Context; public class Main { public static List<String> loadBusList(Context context) throws IOException { InputStream is = context.getAssets().open("list.txt"); BufferedReader br = new BufferedReader(new InputStreamReader(is)); List<String> list = new ArrayList<String>(); String line; while ((line = br.readLine()) != null) { list.add(line); } br.close(); return list; } }