How to read a local (res/raw) file line by line?

前端 未结 2 751
清歌不尽
清歌不尽 2020-12-21 14:06

I have a text file in my res/raw directory. I want to read the file line by line, but FileReader and BufferedReader fail, because of Android\'s security restriction. How els

2条回答
  •  清歌不尽
    2020-12-21 14:46

    A DataInputStream allows you to do a readLine (along with a host of other operations); see DataInputStream Reference.

提交回复
热议问题