/** * parser the String message. * @param header - header structure to fill in. * @throws ParseException if the message does not respect the spec. */ public void parse(AuthenticationHeader header) throws ParseException { // the Scheme: this.lexer.SPorHT(); lexer.match(TokenTypes.ID); Token type = lexer.getNextToken(); this.lexer.SPorHT(); header.setScheme(type.getTokenValue()); // The parameters: try { while (lexer.lookAhead(0) != '\n') { this.parseParameter(header); this.lexer.SPorHT(); char la = lexer.lookAhead(0); if (la == '\n' || la == '\0') break; this.lexer.match(','); this.lexer.SPorHT(); } } catch (ParseException ex) { throw ex; } } }