Perform the origin field parsing.
try {
OriginField originField = new OriginField();
lexer.match('o");
lexer.SPorHT();
lexer.match('=");
lexer.SPorHT();
lexer.match(LexerCore.ID);
Token userName = lexer.getNextToken();
originField.setUsername(userName.getTokenValue());
this.lexer.SPorHT();
lexer.match(LexerCore.ID);
Token sessionId = lexer.getNextToken();
originField.setSessId(Long.parseLong(sessionId.getTokenValue()));
this.lexer.SPorHT();
lexer.match(LexerCore.ID);
Token sessionVersion = lexer.getNextToken();
originField.setSessVersion(Long.parseLong(
sessionVersion.getTokenValue()));
this.lexer.SPorHT();
lexer.match(LexerCore.ID);
Token networkType = lexer.getNextToken();
originField.setNettype(networkType.getTokenValue());
this.lexer.SPorHT();
lexer.match(LexerCore.ID);
Token addressType = lexer.getNextToken();
originField.setAddrtype(addressType.getTokenValue());
this.lexer.SPorHT();
String host = lexer.getRest();
Lexer lexer = new Lexer("charLexer", host);
HostNameParser hostNameParser = new HostNameParser(lexer);
Host h = hostNameParser.host();
originField.setAddress(h);
return originField;
} catch (SdpException e) {
throw new ParseException(lexer.getBuffer(), lexer.getPtr());
} catch (NumberFormatException nfe) {
throw new ParseException(lexer.getBuffer(), lexer.getPtr());
}