I have a huge file that looks like this:
7
bla1
blala
blabla
blab
blals
blable
bla
more here..
The first numbers tells how many values I will have. The thing, is that i just want to point directly to the line 11 (text “more here..”), without having to read all those values before. In my case, I have a big amount of numbers, so it has to be optimized.
Would you recommend me something?
You can make something file-like that will skip past the first N lines:
Like so:
Easy to do if you just want to iterate forward through lines of a file. It becomes arduous, however, if you want to mimic the
FileorIOinterface exactly (but seeDelegate) and especially if you want to support rewindability back to the fake start of your file.