I have to read txt files in my program. Im currently using FileReader and BufferedReader. I tried to use Scanner but its slower than FileReader and BufferedReader. Is there any class, which can read files faster ? It must be written in Java Language.
I need to read all words(strings splited by white space) from text file
If the files being read is huge then you would want to use
BufferedReaderon top of aFileReaderto improve read performance.or you may try something likethis:-
or you can try this program. It works faster for larger files:-