java.lang.Object
com.aoapps.net.URIParser
URI parsing utilities.
- Author:
- AO Industries, Inc.
- 
Method SummaryModifier and TypeMethodDescriptionstatic intgetPathEnd(String uri) Find the first of '?'static intgetPathEnd(String uri, int fromIndex) Find the first of '?'static final StringGets the scheme for a URI, ornullwhen no scheme found.static intGets the length of a scheme.static booleanChecks if a URI has a scheme, not including any empty scheme (starts with ':').static booleanChecks if a URI starts with the given scheme.
- 
Method Details- 
getSchemeLengthGets the length of a scheme.- Returns:
- The index of the ':' or -1on empty scheme, invalid character in scheme, or no colon found.
 
- 
isSchemeChecks if a URI starts with the given scheme.- Parameters:
- scheme- The scheme to look for, not including colon. For example- "http".
- Throws:
- IllegalArgumentException- when- schemeis determined to be invalid. Please note that this determination is not guaranteed as shortcuts may skip individual character comparisons.
 
- 
hasSchemeChecks if a URI has a scheme, not including any empty scheme (starts with ':').
- 
getSchemeGets the scheme for a URI, ornullwhen no scheme found. The scheme must start the URI, and matchALPHA *( ALPHA / DIGIT / "+" / "-" / "." )before the first colon (:) found. The scheme is normalized to lower-case. An empty scheme will never be returned (if the URI starts with ':').- Returns:
- The scheme, not including colon, or nullwhen not found. For example"http".
 
- 
getPathEndFind the first of '?' or '#' from the given starting index.- Returns:
- The index of the first '?' or '#' or uri.length()when not found.
 
- 
getPathEndFind the first of '?' or '#'.- Returns:
- The index of the first '?' or '#' or uri.length()when not found.
 
 
- 

