private bool CheckForEof() { if (_lookAhead == 0x00 && _eofOn00) { int extra = RequireByte(); if (extra != 0) { throw new IOException("malformed end-of-contents marker"); } _lookAhead = -1; SetParentEofDetect(true); } return _lookAhead < 0; }