public enum InternetProtocolFamily2 extends Enum<InternetProtocolFamily2>
DatagramChannel| Modifier and Type | Method and Description |
|---|---|
int |
addressNumber()
Returns the
address number
of the family.
|
Class<? extends InetAddress> |
addressType()
Returns the address type of this protocol family.
|
InetAddress |
localhost()
Returns the
InetAddress that represent the LOCALHOST for the family. |
static InternetProtocolFamily2 |
of(InetAddress address)
Returns the
InternetProtocolFamily for the given InetAddress. |
static InternetProtocolFamily2 |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static InternetProtocolFamily2[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final InternetProtocolFamily2 IPv4
public static final InternetProtocolFamily2 IPv6
public static InternetProtocolFamily2[] values()
for (InternetProtocolFamily2 c : InternetProtocolFamily2.values()) System.out.println(c);
public static InternetProtocolFamily2 valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic Class<? extends InetAddress> addressType()
public int addressNumber()
public InetAddress localhost()
InetAddress that represent the LOCALHOST for the family.public static InternetProtocolFamily2 of(InetAddress address)
InternetProtocolFamily for the given InetAddress.Copyright © 2017. All Rights Reserved.