If you have a space between words, read it from the document with inFile.next().

That will stop every time it has a line.

I'm not sure if it'll go to the next line after that, but if not, it...