android怎么从txt文本一条条的读数据,刚才网上查到了java的读法,但是复制到android项目里面,readLine貌似报错啊,readLine是在BufferedReader,android是ByteArrayOutputStream out=new ByteArrayOutputStream();不一样啊
try{
           //s1为要读取的文件路径名
File file = new File(s1);
BufferedReader reader = new BufferedReader(new FileReader(file));
String txt = null;

           //当文件没读完时则继续读
while((txt=reader.readLine())!=null)
{ //从每行第5个开始读
                         String s=txt.subString(4);
System.out.println(s);

}
}catch(Exception e)
{
System.out.print("error!");
}