If anyway all public methods throw `EOFException` on the end-of-file, you can throw `EOFException` here. Then you can remove `reachedEOF` filed itself.