public class IPRange extends Object
130.5.5.25
10000010 . 00000101 . 00000101 . 00011001
255.255.255.0
11111111 . 11111111 . 11111111 . 00000000
<--extended-network-prefix -->
or
130.5.5.25/24
10000010 . 00000101 . 00000101 . 00011001
IPAddress
限定符和类型 | 方法和说明 |
---|---|
int |
getExtendedNetworkPrefix()
Return the extended extended network prefix.
|
IPAddress |
getIPAddress()
Return the encapsulated IP address.
|
IPAddress |
getIPSubnetMask()
Return the encapsulated subnet mask
|
boolean |
isIPAddressInRange(IPAddress address)
Check if the specified IP address is in the encapsulated range.
|
static String |
toDecimalString(String inBinaryIpAddress) |
String |
toString()
Convert the IP Range into a string representation.
|
public IPRange(String range)
range
- String representation of the IP address. The two following formats are supported :IllegalArgumentException
- Throws this exception when the specified string doesn't represent a valid IP
address.public final IPAddress getIPAddress()
public final IPAddress getIPSubnetMask()
public final int getExtendedNetworkPrefix()
public String toString()
public boolean isIPAddressInRange(IPAddress address)
address
- The IP address to be tested.true
if the specified IP address is in the encapsulated IP range, otherwise return
false
.Copyright © 2013-2015 Alibaba Group. All Rights Reserved.