Java.Net.InetAddress.GetByAddress Method
Returns an InetAddress corresponding to the given network-order bytes ipAddress and scopeId.

Syntax

[Android.Runtime.Register("getByAddress", "(Ljava/lang/String;[B)Ljava/net/InetAddress;", "")]
public static InetAddress GetByAddress (string hostName, byte[] ipAddress)

Parameters

hostName
Documentation for this section has not yet been entered.
ipAddress
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Net.UnknownHostExceptionif ipAddress is null or the wrong length.

Remarks

Returns an InetAddress corresponding to the given network-order bytes ipAddress and scopeId.

For an IPv4 address, the byte array must be of length 4. For IPv6, the byte array must be of length 16. Any other length will cause an UnknownHostException.

No reverse lookup is performed. The given hostName (which may be null) is associated with the new InetAddress with no validation done.

(Note that numeric addresses such as "127.0.0.1" are names for the purposes of this API. Most callers probably want InetAddress.GetAllByName(string) instead.)

[Android Documentation]

Requirements

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