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() |
String |
getNextAddress() |
String |
getPreviousAddress() |
boolean |
isInRange(int address)
Returns true if the parameter
address is in the
range of usable endpoint addresses for this subnet. |
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 addresses. Use SubnetUtils.setInclusiveHostCount(boolean)
to change this.address
- A dot-delimited IPv4 address, e.g. "192.168.0.1"public boolean isInRange(int address)
address
is in the
range of usable endpoint addresses for this subnet. This excludes the
network and broadcast addresses by default. Use SubnetUtils.setInclusiveHostCount(boolean)
to change this.address
- the address to checkpublic String getBroadcastAddress()
public String getNetworkAddress()
public String getNetmask()
public String getAddress()
public String getNextAddress()
public String getPreviousAddress()
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 int asInteger(String address)
public String getCidrSignature()
public String[] getAllAddresses()
Copyright © 2001–2020 The Apache Software Foundation. All rights reserved.