Inet6Address.GetByAddress 方法  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| GetByAddress(String, Byte[], NetworkInterface) | 
						 以确切的方式创建 Inet6Address,   | 
        	
| GetByAddress(String, Byte[], Int32) | 
						 按照 IPv6 scope_id设置为给定数值的   | 
        	
GetByAddress(String, Byte[], NetworkInterface)
以确切的方式创建 Inet6Address, InetAddress#getByAddress(String,byte[]) 但 IPv6 scope_id设置为对应于指定 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
	参数
- host
 - String
 
指定的主机
- addr
 - Byte[]
 
网络字节顺序中的原始 IP 地址
- nif
 - NetworkInterface
 
此地址必须与之关联的接口。
返回
从原始 IP 地址创建的 Inet6Address 对象。
- 属性
 
例外
如果地址长度 null 无效或接口没有给定地址类型的数值范围 ID,则为 。
注解
以确切的方式创建 Inet6Address, InetAddress#getByAddress(String,byte[]) 但 IPv6 scope_id设置为对应于指定 addr地址类型的给定接口的值。 如果给定接口没有为给定地址类型(例如 link-local 或 site-local)分配的数字scope_id,则调用将失败并显示 UnknownHostException。 有关 IPv6 作用域地址的说明,请参阅此处。
在 1.5 中添加。
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。
适用于
GetByAddress(String, Byte[], Int32)
按照 IPv6 scope_id设置为给定数值的 InetAddress#getByAddress(String,byte[]) 确切方式创建 Inet6Address。
[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
	参数
- host
 - String
 
指定的主机
- addr
 - Byte[]
 
网络字节顺序中的原始 IP 地址
- scope_id
 - Int32
 
地址的数字scope_id。
返回
从原始 IP 地址创建的 Inet6Address 对象。
- 属性
 
例外
如果地址为 null 或长度无效,
注解
按照 IPv6 scope_id设置为给定数值的 InetAddress#getByAddress(String,byte[]) 确切方式创建 Inet6Address。 不检查scope_id以确定它是否对应于系统上的任何接口。 有关 IPv6 作用域地址的说明,请参阅此处。
在 1.5 中添加。
适用于 . 的 java.net.Inet6Address.getByAddress(java.lang.String, byte[], int)Java 文档
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。