Yes. On top of that, hasNext is just plainly incorrect. Multiple calls to it ends up draining the file. This will be fixed in an upcoming commit.