URLStreamHandler.GetHostAddress(URL) Method

Definition

Get the IP address of our host.

[Android.Runtime.Register("getHostAddress", "(Ljava/net/URL;)Ljava/net/InetAddress;", "GetGetHostAddress_Ljava_net_URL_Handler")]
protected virtual Java.Net.InetAddress? GetHostAddress (Java.Net.URL? u);
[<Android.Runtime.Register("getHostAddress", "(Ljava/net/URL;)Ljava/net/InetAddress;", "GetGetHostAddress_Ljava_net_URL_Handler")>]
abstract member GetHostAddress : Java.Net.URL -> Java.Net.InetAddress
override this.GetHostAddress : Java.Net.URL -> Java.Net.InetAddress

Parameters

u
URL

a URL object

Returns

an InetAddress representing the host IP address.

Attributes

Remarks

Get the IP address of our host. An empty host field or a DNS failure will result in a null return.

Added in 1.3.

Java documentation for java.net.URLStreamHandler.getHostAddress(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.

Applies to