public class IPv4SubnetInfo extends SubnetInfo
Constructor and Description |
---|
IPv4SubnetInfo(Inet4Address address,
int netmask) |
Modifier and Type | Method and Description |
---|---|
String |
getCidrSignature()
Return the CIDR representation of this subnet, depending on whether it is an IPv4 or an IPv6 subnet.
|
String |
getHostAddress()
Return the string representation of the IP address used to initialise this subnet.
|
String |
getNetworkAddress()
Return the string representation of the IP address represented by the subnet with the netmask applied.
|
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.
|
getSubnetInfo, getSubnetInfo, getSubnetInfo
public IPv4SubnetInfo(Inet4Address address, int netmask)
public String getHostAddress()
getHostAddress
in class SubnetInfo
public String getNetworkAddress()
getNetworkAddress
in class SubnetInfo
public String getCidrSignature()
getCidrSignature
in class SubnetInfo
public boolean isInRange(String address)
isInRange
in class SubnetInfo
address
- Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.