/** * Creates a new AcceptEncodingHeader based on the newly supplied encoding * value. * * @param encoding - the new string containing the encoding value. * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the encoding value. * @return the newly created AcceptEncodingHeader object. */ public AcceptEncodingHeader createAcceptEncodingHeader(String encoding) throws ParseException { if (encoding == null) throw new NullPointerException("the encoding parameter is null"); AcceptEncoding acceptEncoding = new AcceptEncoding(); acceptEncoding.setEncoding(encoding); return acceptEncoding; }
if (lexer.startsId()) { Token value = lexer.match(TokenTypes.ID); acceptEncoding.setEncoding(value.getTokenValue());
acceptEncoding.setEncoding(value.getTokenValue());