public final class SubnetUtils.SubnetInfo extends Object
Modifier and Type | Method and Description |
---|---|
int |
asInteger(String address) |
String |
getAddress() |
int |
getAddressCount()
Deprecated.
(3.4) use
getAddressCountLong() instead |
long |
getAddressCountLong()
Get the count of available addresses.
|
String[] |
getAllAddresses() |
String |
getBroadcastAddress() |
String |
getCidrSignature() |
String |
getHighAddress()
Return the high address as a dotted IP address.
|
String |
getLowAddress()
Return the low address as a dotted IP address.
|
String |
getNetmask() |
String |
getNetworkAddress() |
boolean |
isInRange(int address) |
boolean |
isInRange(String address)
Returns true if the parameter
address is in the
range of usable endpoint addresses for this subnet. |
String |
toString() |
public boolean isInRange(String address)
address
is in the
range of usable endpoint addresses for this subnet. This excludes the
network and broadcast adresses.address
- A dot-delimited IPv4 address, e.g. "192.168.0.1"public boolean isInRange(int address)
address
- the address to checkpublic String getBroadcastAddress()
public String getNetworkAddress()
public String getNetmask()
public String getAddress()
public String getLowAddress()
public String getHighAddress()
@Deprecated public int getAddressCount()
getAddressCountLong()
insteadRuntimeException
- if the correct count is greater than Integer.MAX_VALUE
public long getAddressCountLong()
public String getCidrSignature()
public String[] getAllAddresses()
Copyright © 2001–2017 The Apache Software Foundation. All rights reserved.