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