public static enum NetStat.BusyPort.IPVersion extends java.lang.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(java.lang.String versionId)
Determines the
IPVersion from the identifier provided. |
java.net.InetSocketAddress |
getInetSocketAddress(java.lang.String address,
java.lang.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 java.net.InetAddress |
unspecified()
Returns an
InetAddress instance indicating an "unspecified"
(or failed) host address. |
static NetStat.BusyPort.IPVersion |
valueOf(java.lang.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(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 byte[] anyLocal()
IPVersion.public abstract byte[] loopback()
IPVersion.public abstract java.net.InetAddress unspecified()
InetAddress instance indicating an "unspecified"
(or failed) host address.public java.net.InetSocketAddress getInetSocketAddress(java.lang.String address,
java.lang.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(java.lang.String versionId)
IPVersion from the identifier provided.versionId - the identifier to checkIPVersion corresponding to versionIdjava.lang.EnumConstantNotPresentException - if versionId is not a recognized IPVersion designationCopyright © 2022. All rights reserved.