private void ensureValidLookahead ( CharType ... expected ) { if ( ! chars . positiveLookahead ( expected ) ) { throw new UnexpectedCharacterException ( chars . lookahead ( 1 ) , chars . currentOffset ( ) , expected ) ; } }
Checks if the next character in the stream is valid .