java.net
Class Inet4Address

java.lang.Object
  extended by java.net.InetAddress
      extended by java.net.Inet4Address
All Implemented Interfaces:
Serializable

public final class Inet4Address
extends InetAddress

See Also:
Serialized Form

Method Summary
 boolean equals(Object obj)
          Compare the current Inet4Address instance with obj
 byte[] getAddress()
          Returns the address of the current instance
 String getHostAddress()
          Returns the address as string
 int hashCode()
          Computes the hashcode of the instance
 boolean isAnyLocalAddress()
          Checks if this address is a wildcard address
 boolean isLinkLocalAddress()
          Checks if this address is a link local address
 boolean isLoopbackAddress()
          Checks if this address is a loopback address
 boolean isMCGlobal()
          Checks if this multicast address has global scope
 boolean isMCLinkLocal()
          Checks if this multicast address has link scope
 boolean isMCNodeLocal()
          Checks if this multicast address has node scope
 boolean isMCOrgLocal()
          Checks if this multicast address has organization scope
 boolean isMCSiteLocal()
          Checks if this multicast address has site scope
 boolean isMulticastAddress()
          Checks if the address is a multicast address
 boolean isSiteLocalAddress()
          Checks if this address is a site local address
 
Methods inherited from class java.net.InetAddress
getAllByName, getByAddress, getByAddress, getByName, getCanonicalHostName, getHostName, getLocalHost, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

isMulticastAddress

public boolean isMulticastAddress()
Checks if the address is a multicast address

Overrides:
isMulticastAddress in class InetAddress
Returns:
true if mulitcast, false if not
Since:
1.1

isLoopbackAddress

public boolean isLoopbackAddress()
Checks if this address is a loopback address

Overrides:
isLoopbackAddress in class InetAddress

isAnyLocalAddress

public boolean isAnyLocalAddress()
Checks if this address is a wildcard address

Overrides:
isAnyLocalAddress in class InetAddress
Since:
1.4

isLinkLocalAddress

public boolean isLinkLocalAddress()
Checks if this address is a link local address

Overrides:
isLinkLocalAddress in class InetAddress
Since:
1.4

isSiteLocalAddress

public boolean isSiteLocalAddress()
Checks if this address is a site local address

Overrides:
isSiteLocalAddress in class InetAddress
Since:
1.4

isMCGlobal

public boolean isMCGlobal()
Checks if this multicast address has global scope

Overrides:
isMCGlobal in class InetAddress
Since:
1.4

isMCNodeLocal

public boolean isMCNodeLocal()
Checks if this multicast address has node scope

Overrides:
isMCNodeLocal in class InetAddress
Since:
1.4

isMCLinkLocal

public boolean isMCLinkLocal()
Checks if this multicast address has link scope

Overrides:
isMCLinkLocal in class InetAddress
Since:
1.4

isMCSiteLocal

public boolean isMCSiteLocal()
Checks if this multicast address has site scope

Overrides:
isMCSiteLocal in class InetAddress
Since:
1.4

isMCOrgLocal

public boolean isMCOrgLocal()
Checks if this multicast address has organization scope

Overrides:
isMCOrgLocal in class InetAddress
Since:
1.4

getAddress

public byte[] getAddress()
Returns the address of the current instance

Overrides:
getAddress in class InetAddress
Returns:
IP address

getHostAddress

public String getHostAddress()
Returns the address as string

Overrides:
getHostAddress in class InetAddress
Returns:
The IP address of this object in String form
Since:
1.0.2

hashCode

public int hashCode()
Computes the hashcode of the instance

Overrides:
hashCode in class InetAddress
Returns:
A hash value for this address.
See Also:
Object.equals(Object), System.identityHashCode(Object)

equals

public boolean equals(Object obj)
Compare the current Inet4Address instance with obj

Overrides:
equals in class InetAddress
Parameters:
obj - Object to compare with
Returns:
true if the passed in object's address is equal to this one's, false otherwise
See Also:
Object.hashCode()