I currently have 2 BufferedReaders initialized on the same text file. When I\'m done reading the text file with the first BufferedReader, I use the
The best way to proceed is to change your algorithm, in a way in which you will NOT need the second pass. I used this approach a couple of times, when I had to deal with huge (but not terrible, i.e. few GBs) files which didn't fit the available memory.
It might be hard, but the performance gain usually worths the effort