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.
精彩评论