Inet6Address.GetByAddress Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetByAddress(String, Byte[], NetworkInterface) |
Create an Inet6Address in the exact manner of |
GetByAddress(String, Byte[], Int32) |
Create an Inet6Address in the exact manner of |
GetByAddress(String, Byte[], NetworkInterface)
Create an Inet6Address in the exact manner of InetAddress#getByAddress(String,byte[])
except that the IPv6 scope_id is
set to the value corresponding to the given interface for the address
type specified in addr
.
[Android.Runtime.Register("getByAddress", "(Ljava/lang/String;[BLjava/net/NetworkInterface;)Ljava/net/Inet6Address;", "")]
public static Java.Net.Inet6Address? GetByAddress (string? host, byte[]? addr, Java.Net.NetworkInterface? nif);
[<Android.Runtime.Register("getByAddress", "(Ljava/lang/String;[BLjava/net/NetworkInterface;)Ljava/net/Inet6Address;", "")>]
static member GetByAddress : string * byte[] * Java.Net.NetworkInterface -> Java.Net.Inet6Address
Parameters
- host
- String
the specified host
- addr
- Byte[]
the raw IP address in network byte order
- nif
- NetworkInterface
an interface this address must be associated with.
Returns
an Inet6Address object created from the raw IP address.
- Attributes
Exceptions
if the address is null
or has an invalid length or
the interface doesn't have a numeric scope id for the given
address type.
Remarks
Create an Inet6Address in the exact manner of InetAddress#getByAddress(String,byte[])
except that the IPv6 scope_id is set to the value corresponding to the given interface for the address type specified in addr
. The call will fail with an UnknownHostException if the given interface does not have a numeric scope_id assigned for the given address type (eg. link-local or site-local). See here for a description of IPv6 scoped addresses.
Added in 1.5.
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
GetByAddress(String, Byte[], Int32)
Create an Inet6Address in the exact manner of InetAddress#getByAddress(String,byte[])
except that the IPv6 scope_id is
set to the given numeric value.
[Android.Runtime.Register("getByAddress", "(Ljava/lang/String;[BI)Ljava/net/Inet6Address;", "")]
public static Java.Net.Inet6Address? GetByAddress (string? host, byte[]? addr, int scope_id);
[<Android.Runtime.Register("getByAddress", "(Ljava/lang/String;[BI)Ljava/net/Inet6Address;", "")>]
static member GetByAddress : string * byte[] * int -> Java.Net.Inet6Address
Parameters
- host
- String
the specified host
- addr
- Byte[]
the raw IP address in network byte order
- scope_id
- Int32
the numeric scope_id for the address.
Returns
an Inet6Address object created from the raw IP address.
- Attributes
Exceptions
if the address is null or has an invalid length.
Remarks
Create an Inet6Address in the exact manner of InetAddress#getByAddress(String,byte[])
except that the IPv6 scope_id is set to the given numeric value. The scope_id is not checked to determine if it corresponds to any interface on the system. See here for a description of IPv6 scoped addresses.
Added in 1.5.
Java documentation for java.net.Inet6Address.getByAddress(java.lang.String, byte[], int)
.
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.