Create an empty Uri
Construct a Uri from the provided character string
Construct a Uri from the given components. The query is optional.
Clone another Uri. This can be used to make a mutable Uri from an immutable UriView.
old method names
Decode a duplicated string with potential %hex values in it
Return the default port for the given scheme. InvalidPort is returned if the scheme is unknown, or does not accept a port.
Extend the Uri query
Parsing is performed according to RFC 2396
Emit the content of this Uri via the provided Consumer. The output is constructed per RFC 2396.
Parse the given uri, with support for relative URLs
Clear everything to null.
Emit the content of this Uri via the provided Consumer. The output is constructed per RFC 2396.
Return a valid port number by performing a lookup on the known schemes if the port was not explicitly specified.
Return the parsed fragment, or null if a fragment was not provided.
Set the Uri fragment
Return the parsed host, or null if the host was not specified
Set the Uri host
Return whether or not the Uri scheme is considered generic.
Return the parsed path, or null if the path was not provided.
Set the Uri path
Return the parsed port number, or InvalidPort if the port was not provided.
Set the Uri port
Return the parsed query, or null if a query was not provided.
Set the Uri query
Return the parsed scheme, or null if the scheme was not specified
Set the Uri scheme
Return the parsed userinfo, or null if userinfo was not provided.
Set the Uri userinfo
Encode uri characters into a Consumer, such that reserved chars are converted into their %hex version.
Encode uri characters into a string, such that reserved chars are converted into their %hex version.
Return the default port for the given scheme. InvalidPort is returned if the scheme is unknown, or does not accept a port.
Return the parsed scheme, or null if the scheme was not specified
Return the parsed host, or null if the host was not specified
Return the parsed port number, or InvalidPort if the port was not provided.
Return a valid port number by performing a lookup on the known schemes if the port was not explicitly specified.
Return the parsed userinfo, or null if userinfo was not provided.
Return the parsed path, or null if the path was not provided.
Return the parsed query, or null if a query was not provided.
Return the parsed fragment, or null if a fragment was not provided.
Return whether or not the UriView scheme is considered generic.
Implements an RFC 2396 compliant URI specification. See <A HREF="http://ftp.ics.uci.edu/pub/ietf/uri/rfc2396.txt">this page</A> for more information.
The implementation fails the spec on two counts: it doesn't insist on a scheme being present in the Uri, and it doesn't implement the "Relative References" support noted in section 5.2. The latter can be found in tango.util.PathUtil instead.
Note that IRI support can be implied by assuming each of userinfo, path, query, and fragment are UTF-8 encoded (see <A HREF="http://www.w3.org/2001/Talks/0912-IUC-IRI/paper.html"> this page</A> for further details).