public class URLParser extends Parser
debug, lexer
ACCEPT, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ACK, ALERT_INFO, ALLOW, ALLOW_EVENTS, ALPHA, AND, AT, AUTHENTICATION_INFO, AUTHORIZATION, BACK_QUOTE, BACKSLASH, BAR, BYE, CALL_ID, CALL_INFO, CANCEL, COLON, CONTACT, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_TYPE, CSEQ, DATE, DIGIT, DOLLAR, DOT, DOUBLEQUOTE, ENCRYPTION, END, EQUALS, ERROR_INFO, EVENT, EXCLAMATION, EXPIRES, FROM, GREATER_THAN, HAT, HIDE, HT, ID, IN_REPLY_TO, INVITE, JOIN_TO, L_CURLY, L_SQUARE_BRACKET, LESS_THAN, LPAREN, MAX_FORWARDS, MESSAGE, MIME_VERSION, MIN_EXPIRES, MINSE_TO, MINUS, NOTIFY, NULL, OPTIONS, ORGANIZATION, P_ACCESS_NETWORK_INFO, P_ASSERTED_IDENTITY, P_ASSERTED_SERVICE, P_ASSOCIATED_URI, P_CALLED_PARTY_ID, P_CHARGING_FUNCTION_ADDRESSES, P_MEDIA_AUTHORIZATION, P_MEDIA_AUTHORIZATION_TOKEN, P_PREFERRED_IDENTITY, P_PREFERRED_SERVICE, P_PROFILE_KEY, P_SERVED_USER, P_USER_DATABASE, P_VECTOR_CHARGING, P_VISITED_NETWORK_ID, PATH, PERCENT, PLUS, POUND, PRIORITY, PRIVACY, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, PROXY_REQUIRE, PUBLISH, QUESTION, QUOTE, R_CURLY, R_SQUARE_BRACKET, RACK, REASON, RECORD_ROUTE, REFER_TO, REFERENCES, REFERREDBY_TO, REGISTER, REPLACES_TO, REPLY_TO, REQUIRE, RESPONSE_KEY, RETRY_AFTER, ROUTE, RPAREN, RSEQ, SAFE, SECURITY_CLIENT, SECURITY_SERVER, SECURITY_VERIFY, SEMICOLON, SERVER, SERVICE_ROUTE, SESSIONEXPIRES_TO, SIP, SIP_ETAG, SIP_IF_MATCH, SIPS, SLASH, SP, STAR, START, SUBJECT, SUBSCRIBE, SUBSCRIPTION_STATE, SUPPORTED, TEL, TILDE, TIMESTAMP, TO, UNDERSCORE, UNSUPPORTED, USER_AGENT, VIA, WARNING, WHITESPACE, WWW_AUTHENTICATE
Constructor and Description |
---|
URLParser(Lexer lexer) |
URLParser(String url) |
Modifier and Type | Method and Description |
---|---|
protected String |
escaped() |
protected String |
hvalue() |
protected boolean |
isEscaped() |
protected static boolean |
isMark(char next) |
protected static boolean |
isReserved(char next) |
protected static boolean |
isReservedNoSlash(char next) |
protected static boolean |
isUnreserved(char next) |
protected static boolean |
isUserUnreserved(char la) |
static void |
main(String[] args) |
protected String |
mark() |
protected String |
paramNameOrValue()
Name or value of a parameter.
|
GenericURI |
parse()
Default parse method.
|
TelephoneNumber |
parseTelephoneNumber(boolean inBrackets)
Parser for telephone subscriber.
|
protected String |
password() |
String |
peekScheme() |
protected NameValue |
qheader()
Get a name value for a given query header (ie one that comes
after the ?).
|
protected String |
reserved() |
SipUri |
sipURL(boolean inBrackets)
Parse and return a structure for a SIP URL.
|
TelURLImpl |
telURL(boolean inBrackets)
Parse and return a structure for a Tel URL.
|
protected String |
unreserved() |
protected String |
uric() |
protected String |
uricNoSlash() |
protected String |
uricString() |
GenericURI |
uriReference(boolean inBrackets)
Parse and return a structure for a generic URL.
|
protected String |
urlString()
Scan forward until you hit a terminating character for a URL.
|
protected String |
user() |
checkToken, createParseException, getLexer, method, sipVersion
protected static boolean isMark(char next)
protected static boolean isUnreserved(char next)
protected static boolean isReservedNoSlash(char next)
protected static boolean isUserUnreserved(char la)
protected String unreserved() throws ParseException
ParseException
protected String paramNameOrValue() throws ParseException
ParseException
protected static boolean isReserved(char next)
protected String reserved() throws ParseException
ParseException
protected boolean isEscaped()
protected String escaped() throws ParseException
ParseException
protected String mark() throws ParseException
ParseException
protected String uric()
protected String uricNoSlash()
protected String uricString() throws ParseException
ParseException
public GenericURI uriReference(boolean inBrackets) throws ParseException
ParseException
- if there was a problem parsing.public final TelephoneNumber parseTelephoneNumber(boolean inBrackets) throws ParseException
ParseException
public TelURLImpl telURL(boolean inBrackets) throws ParseException
ParseException
public SipUri sipURL(boolean inBrackets) throws ParseException
ParseException
- if there was a problem parsing.public String peekScheme() throws ParseException
ParseException
protected NameValue qheader() throws ParseException
ParseException
protected String hvalue() throws ParseException
ParseException
protected String urlString() throws ParseException
ParseException
protected String user() throws ParseException
ParseException
protected String password() throws ParseException
ParseException
public GenericURI parse() throws ParseException
ParseException
public static void main(String[] args) throws ParseException
ParseException
Copyright © 2018. All Rights Reserved.