简体   繁体   中英

Can inetAddress be used with inet6/IPv6?

inetAddress可以与inet6 / IPv6一起使用吗?

Yes.

Using the method InetAddress.getByName( String name) for instance.

From the doc:

For host specified in literal IPv6 address, either the form defined in RFC 2732 or the literal IPv6 address format defined in RFC 2373 is accepted. IPv6 scoped addresses are also supported.

See the doc for more details.

Yes. It can using the Inet6Address subclass of InetAddress .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM