Share via


Uri Class

Definition

Immutable URI reference.

[Android.Runtime.Register("android/net/Uri", DoNotGenerateAcw=true)]
public abstract class Uri : Java.Lang.Object, Android.OS.IParcelable, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.IComparable
[<Android.Runtime.Register("android/net/Uri", DoNotGenerateAcw=true)>]
type Uri = class
    inherit Object
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
    interface IComparable
Inheritance
Attributes
Implements

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 RFC 2396.

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.

Java documentation for android.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.

Constructors

Uri(IntPtr, JniHandleOwnership)

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

Properties

Authority

Gets the decoded authority part of this URI.

Class

Returns the runtime class of this Object.

(Inherited from Object)
Creator

Reads Uris from Parcels.

Empty

The empty URI, equivalent to "".

EncodedAuthority

Gets the encoded authority part of this URI.

EncodedFragment

Gets the encoded fragment part of this URI, everything after the '#'.

EncodedPath

Gets the encoded path.

EncodedQuery

Gets the encoded query component from this URI.

EncodedSchemeSpecificPart

Gets the scheme-specific part of this URI, i.e. everything between the scheme separator ':' and the fragment separator '#'.

EncodedUserInfo

Gets the encoded user information from the authority.

Fragment

Gets the decoded fragment part of this URI, everything after the '#'.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
Host

Gets the encoded host from the authority for this URI.

IsAbsolute

Returns true if this URI is absolute, i.

IsHierarchical

Returns true if this URI is hierarchical like "http://google.com".

IsOpaque

Returns true if this URI is opaque like "mailto:nobody

IsRelative

Returns true if this URI is relative, i.e. if it doesn't contain an explicit scheme.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
LastPathSegment

Gets the decoded last segment in the path.

Path

Gets the decoded path.

PathSegments

Gets the decoded path segments.

PeerReference (Inherited from Object)
Port

Gets the port from the authority for this URI.

Query

Gets the decoded query component from this URI.

QueryParameterNames

Returns a set of the unique names of all query parameters.

Scheme

Gets the scheme of this URI.

SchemeSpecificPart

Gets the scheme-specific part of this URI, i.e. everything between the scheme separator ':' and the fragment separator '#'.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

UserInfo

Gets the decoded user information from the authority.

Methods

BuildUpon()

Constructs a new builder, copying the attributes from this Uri.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CompareTo(Uri)

Compares the string representation of this Uri with that of another.

Decode(String)

Decodes '%'-escaped octets in the given string using the UTF-8 scheme.

DescribeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Encode(String, String)

Encodes characters in the given string as '%'-escaped octets using the UTF-8 scheme.

Encode(String)

Encodes characters in the given string as '%'-escaped octets using the UTF-8 scheme.

Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
FromFile(File)

Creates a Uri from a file.

FromParts(String, String, String)

Creates an opaque Uri from the given components.

GetBooleanQueryParameter(String, Boolean)

Searches the query string for the first value with the given key and interprets it as a boolean value.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetQueryParameter(String)

Searches the query string for the first value with the given key.

GetQueryParameters(String)

Searches the query string for parameter values with the given key.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
NormalizeScheme()

Return an equivalent URI with a lowercase scheme component.

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
Parse(String)

Creates a Uri which parses the given encoded URI string.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns the encoded string representation of this URI.

UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
WithAppendedPath(Uri, String)

Creates a new Uri by appending an already-encoded path segment to a base Uri.

WriteToParcel(Parcel, ParcelableWriteFlags)

Flatten this object in to a Parcel.

WriteToParcel(Parcel, Uri)

Writes a Uri to a Parcel.

Explicit Interface Implementations

IComparable.CompareTo(Object)
IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to