URI.Resolve Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Resolve(URI) |
Resolves the given URI against this URI. |
Resolve(String) |
Constructs a new URI by parsing the given string and then resolving it against this URI. |
Resolve(URI)
Resolves the given URI against this URI.
[Android.Runtime.Register("resolve", "(Ljava/net/URI;)Ljava/net/URI;", "")]
public Java.Net.URI? Resolve (Java.Net.URI? uri);
[<Android.Runtime.Register("resolve", "(Ljava/net/URI;)Ljava/net/URI;", "")>]
member this.Resolve : Java.Net.URI -> Java.Net.URI
Parameters
- uri
- URI
The URI to be resolved against this URI
Returns
The resulting URI
- Attributes
Remarks
Resolves the given URI against this URI.
If the given URI is already absolute, or if this URI is opaque, then the given URI is returned.
"resolve-frag"> If the given URI's fragment component is defined, its path component is empty, and its scheme, authority, and query components are undefined, then a URI with the given fragment but with all other components equal to those of this URI is returned. This allows a URI representing a standalone fragment reference, such as "#foo"
, to be usefully resolved against a base URI.
Otherwise this method constructs a new hierarchical URI in a manner consistent with RFC 2396, section 5.2; that is:
<ol>
<li>
A new URI is constructed with this URI's scheme and the given URI's query and fragment components.
</li>
<li>
If the given URI has an authority component then the new URI's authority and path are taken from the given URI.
</li>
<li>
Otherwise the new URI's authority component is copied from this URI, and its path is computed as follows:
<ol>
<li>
If the given URI's path is absolute then the new URI's path is taken from the given URI.
</li>
<li>
Otherwise the given URI's path is relative, and so the new URI's path is computed by resolving the path of the given URI against the path of this URI. This is done by concatenating all but the last segment of this URI's path, if any, with the given URI's path and then normalizing the result as if by invoking the #normalize() normalize
method.
</li>
</ol></li>
</ol>
The result of this method is absolute if, and only if, either this URI is absolute or the given URI is absolute.
Java documentation for java.net.URI.resolve(java.net.URI)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Resolve(String)
Constructs a new URI by parsing the given string and then resolving it against this URI.
[Android.Runtime.Register("resolve", "(Ljava/lang/String;)Ljava/net/URI;", "")]
public Java.Net.URI? Resolve (string? str);
[<Android.Runtime.Register("resolve", "(Ljava/lang/String;)Ljava/net/URI;", "")>]
member this.Resolve : string -> Java.Net.URI
Parameters
- str
- String
The string to be parsed into a URI
Returns
The resulting URI
- Attributes
Remarks
Constructs a new URI by parsing the given string and then resolving it against this URI.
This convenience method works as if invoking it were equivalent to evaluating the expression #resolve(java.net.URI) resolve
(URI.
#create(String) create
(str))
.
Java documentation for java.net.URI.resolve(java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.