Android Guides | Samples

Android.Net.Uri Class

Immutable URI reference.

See Also: Uri

Syntax

[Android.Runtime.Register("android/net/Uri", DoNotGenerateAcw=true)]
public abstract class Uri : Object, IParcelable, IComparable, IDisposable

Remarks

Immutable URI reference. A URI reference includes a URI and a fragment, the component of the URI following a '#'. Builds and parses URI references which conform to .

In the interest of performance, this class performs little to no validation. Behavior is undefined for invalid input. This class is very forgiving--in the face of invalid input, it will return garbage rather than throw an exception unless otherwise specified.

[Android Documentation]

Requirements

Namespace: Android.Net
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Net.Uri are listed below.

See Also: Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
abstract
AuthorityString. Gets the decoded authority part of this URI.
[read-only]
static
CreatorIParcelableCreator. Reads Uris from Parcels.
[read-only]
static
EmptyUri. The empty URI, equivalent to "".
[read-only]
abstract
EncodedAuthorityString. Gets the encoded authority part of this URI.
[read-only]
abstract
EncodedFragmentString. Gets the encoded fragment part of this URI, everything after the '#'.
[read-only]
abstract
EncodedPathString. Gets the encoded path.
[read-only]
abstract
EncodedQueryString. Gets the encoded query component from this URI.
[read-only]
abstract
EncodedSchemeSpecificPartString. Gets the scheme-specific part of this URI, i.e. everything between the scheme separator ':' and the fragment separator '#'.
[read-only]
abstract
EncodedUserInfoString. Gets the encoded user information from the authority.
[read-only]
abstract
FragmentString. Gets the decoded fragment part of this URI, everything after the '#'.
[read-only]
abstract
HostString. Gets the encoded host from the authority for this URI.
[read-only]
IsAbsoluteBoolean. Returns true if this URI is absolute, i.e. if it contains an explicit scheme.
[read-only]
abstract
IsHierarchicalBoolean. Returns true if this URI is hierarchical like "http://google.com".
[read-only]
IsOpaqueBoolean. Returns true if this URI is opaque like "mailto:nobody@google.com".
[read-only]
abstract
IsRelativeBoolean. Returns true if this URI is relative, i.e. if it doesn't contain an explicit scheme.
[read-only]
abstract
LastPathSegmentString. Gets the decoded last segment in the path.
[read-only]
abstract
PathString. Gets the decoded path.
[read-only]
abstract
PathSegmentsIList<string>. Gets the decoded path segments.
[read-only]
abstract
PortInt32. Gets the port from the authority for this URI.
[read-only]
abstract
QueryString. Gets the decoded query component from this URI.
[read-only]
QueryParameterNamesICollection<string>. Returns a set of the unique names of all query parameters.
[read-only]
abstract
SchemeString. Gets the scheme of this URI.
[read-only]
abstract
SchemeSpecificPartString. Gets the scheme-specific part of this URI, i.e. everything between the scheme separator ':' and the fragment separator '#'.
[read-only]
abstract
UserInfoString. Gets the decoded user information from the authority.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

abstract
BuildUpon() : Uri+Builder
Constructs a new builder, copying the attributes from this Uri.
CompareTo(Uri) : Int32
Compares the string representation of this Uri with that of another.
static
Decode(String) : String
Decodes '%'-escaped octets in the given string using the UTF-8 scheme.
abstract
DescribeContents() : Int32
static
Encode(String) : String
Encodes characters in the given string as '%'-escaped octets using the UTF-8 scheme.
static
Encode(String, String) : String
Encodes characters in the given string as '%'-escaped octets using the UTF-8 scheme.
static
FromFile(File) : Uri
Creates a Uri from a file.
static
FromParts(String, String, String) : Uri
Creates an opaque Uri from the given components.
GetBooleanQueryParameter(String, Boolean) : Boolean
Searches the query string for the first value with the given key and interprets it as a boolean value. "false" and "0" are interpreted as false, everything else is interpreted as true.
GetQueryParameter(String) : String
Searches the query string for the first value with the given key.
GetQueryParameters(String) : IList<string>
Searches the query string for parameter values with the given key.
NormalizeScheme() : Uri
Return an equivalent URI with a lowercase scheme component.
static
Parse(String) : Uri
Creates a Uri which parses the given encoded URI string.
abstract
ToString() : String
Returns the encoded string representation of this URI.
static
WithAppendedPath(Uri, String) : Uri
Creates a new Uri by appending an already-encoded path segment to a base Uri.
static
WriteToParcel(Parcel, Uri)
Writes a Uri to a Parcel.
abstract
WriteToParcel(Parcel, ParcelableWriteFlags)

Explicitly Implemented Interface Members