public static enum NetStat.BusyPort.IPVersion extends Enum<NetStat.BusyPort.IPVersion>
| Modifier and Type | Method and Description |
|---|---|
byte[] |
anyLocal()
Gets the byte-array form of "any local address" for this
IPVersion. |
static NetStat.BusyPort.IPVersion |
fromId(String versionId)
Determines the
IPVersion from the identifier provided. |
InetSocketAddress |
getInetSocketAddress(String address,
String port)
Gets an
InetSocketAddress instance composed of the IP address and port provided. |
abstract byte[] |
loopback()
Gets the byte-array form of the "loopback address" for this
IPVersion. |
abstract InetAddress |
unspecified()
Returns an
InetAddress instance indicating an "unspecified"
(or failed) host address. |
static NetStat.BusyPort.IPVersion |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NetStat.BusyPort.IPVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NetStat.BusyPort.IPVersion IPV4
public static final NetStat.BusyPort.IPVersion IPV6
public static NetStat.BusyPort.IPVersion[] values()
for (NetStat.BusyPort.IPVersion c : NetStat.BusyPort.IPVersion.values()) System.out.println(c);
public static NetStat.BusyPort.IPVersion 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 byte[] anyLocal()
IPVersion.public abstract byte[] loopback()
IPVersion.public abstract InetAddress unspecified()
InetAddress instance indicating an "unspecified"
(or failed) host address.public InetSocketAddress getInetSocketAddress(String address, String port)
InetSocketAddress instance composed of the IP address and port provided.address - the IP address conforming to this IPVersion; a value of *
is interpreted as the "any local" addressport - the socket port; a value of * is interpreted as 0 (undesignated)InetSocketAddress instance for address and port; the
InetSocketAddress returned may not be of the type implied by this
IPVersion instance -- lsof does not maintain strict type alignment
for IP addressespublic static NetStat.BusyPort.IPVersion fromId(String versionId)
IPVersion from the identifier provided.versionId - the identifier to checkIPVersion corresponding to versionIdEnumConstantNotPresentException - if versionId is not a recognized IPVersion designationCopyright © 2022. All rights reserved.