Reading nextInt() from a text file on a new line?

How can I do this?

I have a textfile that looks like this:

0000
0000
0000

How can I read the integers in the file on the next line using nextInt() because it gets to the end of the first line and errors occur.

I know there must be a simple solution for this but I just have a huge mental block at the moment