Skip navigation links
com.octetstring.vde
Class IPAddress
java.lang.Object
com.octetstring.vde.IPAddress
- All Implemented Interfaces:
- java.lang.Comparable
-
public abstract class IPAddress
- extends java.lang.Object
- implements java.lang.Comparable
Method Summary |
int |
compareTo(java.lang.Object addr)
This method compares each octet in this IPAddress with the specified object for order. |
static IPAddress |
getByAddress(java.lang.String addr)
This method creates an IPAddress instance based on the provided textual representation of IP address. |
java.lang.String |
getHostAddress()
|
int |
getIPFamily()
|
boolean |
isSubnetAddress()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IPAddress
public IPAddress()
getByAddress
public static IPAddress getByAddress(java.lang.String addr)
- This method creates an IPAddress instance based on the provided textual representation of IP address. If addr specifies an IPv4 address, an instance of IPv4Address will be returned; otherwise an instance of IPv6Address will be returned.
-
- Parameters:
host
- textual representation of IP address.
- Returns:
- an IPAddress object created from the raw IP address.
compareTo
public int compareTo(java.lang.Object addr)
- This method compares each octet in this IPAddress with the specified object for order.
-
- Specified by:
compareTo
in interface java.lang.Comparable
-
- Returns:
- negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
getIPFamily
public int getIPFamily()
getHostAddress
public java.lang.String getHostAddress()
isSubnetAddress
public boolean isSubnetAddress()
toString
public java.lang.String toString()
-
- Overrides:
toString
in class java.lang.Object
Skip navigation links
Copyright © 2000-2009 Oracle. All Rights Reserved.