开发者

Reading defining line of text file in java

I am trying to develop application for android . how I can get the defining line of textfile ? For instance I have to read 15. line of textfile. how I 开发者_JAVA百科can do that?


Unless you know each line has the same length, the only way is to read each line until you get to the 15th. You can't skip to a specific line unless you have a way to calculate its offset, or maintain some sort of index file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜