开发者

get only third line data of a file in android

In my android app i am reading a file but require anly the data on third line to be displayed.Is th开发者_StackOverflow社区ere any way to do that.

Please forward your suggestion:)

Thanks in advance.


Not to be too specious, but.....

String str = InputStream.readline();
str = InputStream.readline();
str = InputStream.readline();

Now you have your string ;)

Just be happy that you don't need the thousandth string. (of course, enclosing this is a parameterized for loop would solve that problem)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜