public abstract class SubnetInfo extends Object
| Constructor and Description |
|---|
SubnetInfo() |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getCidrSignature()
Return the CIDR representation of this subnet, depending on whether it is an IPv4 or an IPv6 subnet.
|
abstract String |
getHostAddress()
Return the string representation of the IP address used to initialise this subnet.
|
abstract String |
getNetworkAddress()
Return the string representation of the IP address represented by the subnet with the netmask applied.
|
static SubnetInfo |
getSubnetInfo(InetAddress address) |
static SubnetInfo |
getSubnetInfo(InetAddress address,
int netmask) |
static SubnetInfo |
getSubnetInfo(String cidrAddress) |
abstract boolean |
isInRange(String address)
Return true if the IP address string representation passed as argument is in the range
of the subnet represented by this SubnetInfo.
|
public abstract String getHostAddress()
public abstract String getNetworkAddress()
public abstract boolean isInRange(String address)
address - public abstract String getCidrSignature()
public static SubnetInfo getSubnetInfo(InetAddress address, int netmask) throws UnknownHostException
UnknownHostExceptionpublic static SubnetInfo getSubnetInfo(InetAddress address) throws UnknownHostException
UnknownHostExceptionpublic static SubnetInfo getSubnetInfo(String cidrAddress) throws UnknownHostException
UnknownHostExceptionCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.