[java] Read data from a text file using Java

The reason your code skipped the last line was because you put fis.available() > 0 instead of fis.available() >= 0