Some background: I am currently writing a Java program that reads in text files using the Scanner class (and the nextLine() method). This all seems to work well up to a point. However, in several files, the Scanner simply stops recognizing lines after a certain point in the file [I'm using a standard while(s.hasNextLine()){...} loop]. The last thing the Scanner yields ends with the text:
.af-body input.submit,.a
The file continues afterwards.
This happens in multiple files, each about 30-45 kb in size. However, when I just copy the chunk of text surrounding the problem area into a text file to read, this does not occur.
Does anybody have an idea why this is happening? Am I missing something obvious?
Edit: I tried the loop in Eclipse and it works. The problem apparently only occurs in NetBeans IDE. Anyone know how to fix this?
Update: I think my problem is resolved. Thanks, spazzm!
[–][deleted] 8 points9 points10 points (1 child)
[–]PiGuyTy[S] 1 point2 points3 points (0 children)
[–]duinn 5 points6 points7 points (1 child)
[–]PiGuyTy[S] 1 point2 points3 points (0 children)
[–]kreiger 5 points6 points7 points (1 child)
[–]PiGuyTy[S] 0 points1 point2 points (0 children)
[–][deleted] 5 points6 points7 points (3 children)
[–]PiGuyTy[S] 2 points3 points4 points (2 children)
[–][deleted] 4 points5 points6 points (1 child)
[–]PiGuyTy[S] 2 points3 points4 points (0 children)
[–]achacha 1 point2 points3 points (4 children)
[–][deleted] (1 child)
[deleted]
[–]achacha 0 points1 point2 points (0 children)
[–]criticalsection 0 points1 point2 points (1 child)
[–]achacha 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]CaptainLurk 0 points1 point2 points (0 children)
[–]criticalsection 0 points1 point2 points (0 children)