URL Class

Definition

Class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.

[Android.Runtime.Register("java/net/URL", DoNotGenerateAcw=true)]
public sealed class URL : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.IO.ISerializable
[<Android.Runtime.Register("java/net/URL", DoNotGenerateAcw=true)>]
type URL = class
    inherit Object
    interface ISerializable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
Attributes
Implements

Remarks

Java documentation for java.net.URL.

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

URL(String)

Creates a URL object from the String representation.

URL(String, String, Int32, String)

Creates a URL object from the specified protocol, host, port number, and file.

URL(String, String, Int32, String, URLStreamHandler)

Creates a URL object from the specified protocol, host, port number, file, and handler.

URL(String, String, String)

Creates a URL from the specified protocol name, host name, and file name.

URL(URL, String)

Creates a URL by parsing the given spec within a specified context.

URL(URL, String, URLStreamHandler)

Creates a URL by parsing the given spec with the specified handler within a specified context.

Properties

Authority

Gets the authority part of this URL.

Class

Returns the runtime class of this Object.

(Inherited from Object)
Content

Gets the contents of this URL.

DefaultPort

Gets the default port number of the protocol associated with this URL.

File

Gets the file name of this URL.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
Host

Gets the host name of this URL, if applicable.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Path

Gets the path part of this URL.

PeerReference (Inherited from Object)
Port

Gets the port number of this URL.

Protocol

Gets the protocol name of this URL.

Query

Gets the query part of this URL.

Ref

Gets the anchor (also known as the "reference") of this URL.

ThresholdClass

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

(Inherited from Object)
ThresholdType

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

(Inherited from Object)
UserInfo

Gets the userInfo part of this URL.

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

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

(Inherited from Object)
GetContent(Class[])

Gets the contents of this URL.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
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)
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)
OpenConnection()

Returns a java.net.URLConnection URLConnection instance that represents a connection to the remote object referred to by the URL.

OpenConnection(Proxy)

Same as #openConnection(), except that the connection will be made through the specified proxy; Protocol handlers that do not support proxing will ignore the proxy parameter and make a normal connection.

OpenStream()

Opens a connection to this URL and returns an InputStream for reading from that connection.

SameFile(URL)

Compares two URLs, excluding the fragment component.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetURLStreamHandlerFactory(IURLStreamHandlerFactory)

Sets an application's URLStreamHandlerFactory.

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

Constructs a string representation of this URL.

ToString()

Returns a string representation of the object.

(Inherited from Object)
ToURI()

Returns a java.net.URI equivalent to this URL.

UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until either another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or a specified amount of time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

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