I need to read a text file line by line using Java. I use available() method of FileInputStream to check and loop over the file. But while reading,
available()
FileInputStream
You can try FileUtils from org.apache.commons.io.FileUtils, try downloading jar from here
and you can use the following method: FileUtils.readFileToString("yourFileName");
Hope it helps you..