| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
ipAddress
IP address
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object another) |
int |
getIPAddress()
Return the integer representation of the IP address.
|
int |
hashCode() |
boolean |
isClassA()
Check if the IP address is belongs to a Class A IP address.
|
boolean |
isClassB()
Check if the IP address is belongs to a Class B IP address.
|
boolean |
isClassC()
Check if the IP address is belongs to a Class C IP address.
|
(专用程序包) int |
parseIPAddress(String ipAddressStr)
Convert a decimal-dotted notation representation of an IP address into an 32 bits interger value.
|
String |
toString()
Return the string representation of the IP Address following the common decimal-dotted notation xxx.xxx.xxx.xxx.
|
public IPAddress(String ipAddressStr)
public IPAddress(int address)
public final int getIPAddress()
public String toString()
public final boolean isClassA()
true if the encapsulated IP address belongs to a class A IP address, otherwise
returne false.public final boolean isClassB()
true if the encapsulated IP address belongs to a class B IP address, otherwise
returne false.public final boolean isClassC()
true if the encapsulated IP address belongs to a class C IP address, otherwise
returne false.final int parseIPAddress(String ipAddressStr)
ipAddressStr - Decimal-dotted notation (xxx.xxx.xxx.xxx) of the IP address.InvalidIPAddressException - Throws this exception if the specified IP address is not compliant to the
decimal-dotted notation xxx.xxx.xxx.xxx.Copyright © 2013–2019 Alibaba Group. All rights reserved.