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, getSubnetInfopublic IPv4SubnetInfo(Inet4Address address, int netmask)
public String getHostAddress()
getHostAddress in class SubnetInfopublic String getNetworkAddress()
getNetworkAddress in class SubnetInfopublic String getCidrSignature()
getCidrSignature in class SubnetInfopublic boolean isInRange(String address)
isInRange in class SubnetInfoaddress - Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.