Could anyone can tell me how to read a txt file line by line with DataInputStream?

I also want to check it is EOF or not.

Thank you.