我该如何在安卓应用中读取文本文件:
"1.something written
2.in this file
3.is to be read by
4.the InputStream
..."
这样我就可以获得一个类似于字符串的返回值:
"something written\nin this file\nis to be read by\nthe InputStream"
我所想的是(伪代码):
make an inputstream
is = getAssest().open("textfile.txt"); //in try and catch
for loop{
string = is.read() and if it equals "." (i.e. from 1., 2., 3. etc) add "/n" ...
}