I want to read only the first line of a file in Java and the number of files that i need to process is huge, somewhere around 50000.
I've gone through the API's BufferedReader, Scanner, FileUtils which all give utilities to read a file line by line. The size of my can very and can be huge.
I couldn't come to the conclusion if these API's read the entire files content into memory and then process it line by line.
Could anyone please clarify?
Thanks.