public class IpAddress
extends java.lang.Object
Constructor and Description |
---|
IpAddress(java.net.InetAddress iaddress)
Creates an IpAddress
|
IpAddress(IpAddress ipaddr)
Creates an IpAddress
|
IpAddress(java.lang.String address)
Creates an IpAddress
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Makes a copy
|
boolean |
equals(java.lang.Object obj)
Wthether it is equal to Object obj
|
static IpAddress |
getByName(java.lang.String host_addr)
Gets the IpAddress for a given fully-qualified host name.
|
java.net.InetAddress |
getInetAddress()
Gets the InetAddress
|
static IpAddress |
getLocalHostAddress()
Detects the default IP address of this host.
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
isPrivateAddress()
Checks if it is a private address.
|
java.lang.String |
toString()
Gets a String representation of the Object
|
public IpAddress(java.lang.String address)
public IpAddress(IpAddress ipaddr)
public IpAddress(java.net.InetAddress iaddress)
public java.net.InetAddress getInetAddress()
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static IpAddress getByName(java.lang.String host_addr) throws java.net.UnknownHostException
java.net.UnknownHostException
public boolean isPrivateAddress()
public static IpAddress getLocalHostAddress()