public enum InternetProtocolFamily extends Enum<InternetProtocolFamily>
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 InternetProtocolFamily |
of(InetAddress address)
Returns the
InternetProtocolFamily for the given InetAddress . |
static InternetProtocolFamily |
valueOf(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
public static InternetProtocolFamily[] values()
for (InternetProtocolFamily c : InternetProtocolFamily.values()) System.out.println(c);
public static InternetProtocolFamily 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 InternetProtocolFamily of(InetAddress address)
InternetProtocolFamily
for the given InetAddress
.Copyright © 2008–2017 The Netty Project. All rights reserved.