| java.lang.Object java.net.InetAddress java.net.Inet4Address
Method Summary | |
public boolean | equals(Object obj) Returns true if obj is of the same type as the IPv4 address and they have
the same IP address, false otherwise. | public String | getHostAddress() Returns a String representation of the IP address. | public int | hashCode() Overrides the basic hashcode function. | public boolean | isAnyLocalAddress() | public boolean | isLinkLocalAddress() Answers whether this address has link-local scope. | public boolean | isLoopbackAddress() Answers true if the address is a loopback address. | public boolean | isMCGlobal() Answers true if an address is a global multicast address. | public boolean | isMCLinkLocal() | public boolean | isMCNodeLocal() Answers false for all IPv4 addresses. | public boolean | isMCOrgLocal() Answers true if the address is a organization-local address. | public boolean | isMCSiteLocal() Answers true if the address is a site-local address.The valid range for
IPv4 site-local addresses is: 239.255.0.0 to 239.255.255.255 Hence a mask
of 11101111 11111111 = 0xEFFF. | public boolean | isMulticastAddress() Answers true if the address is a multicast address. | public boolean | isSiteLocalAddress() Answers whether this address has site-local scope. |
Inet4Address | Inet4Address(byte[] address)(Code) | | |
Inet4Address | Inet4Address(byte[] address, String name)(Code) | | |
equals | public boolean equals(Object obj)(Code) | | Returns true if obj is of the same type as the IPv4 address and they have
the same IP address, false otherwise.
true if equal and false otherwise |
getHostAddress | public String getHostAddress()(Code) | | Returns a String representation of the IP address.
Host address |
hashCode | public int hashCode()(Code) | | Overrides the basic hashcode function.
the hash code |
isAnyLocalAddress | public boolean isAnyLocalAddress()(Code) | | Answers if the address is the ANY Address
boolean |
isLinkLocalAddress | public boolean isLinkLocalAddress()(Code) | | Answers whether this address has link-local scope.
RFC 3484 Default Address Selection for Internet Protocol version 6 (IPv6)
states IPv4 auto-configuration addresses, prefix 169.254/16, IPv4
loopback addresses, prefix 127/8, are assigned link-local scope.
boolean |
isLoopbackAddress | public boolean isLoopbackAddress()(Code) | | Answers true if the address is a loopback address. Loopback ipv4
addresses are prefixed with: 011111111 = 127
boolean |
isMCGlobal | public boolean isMCGlobal()(Code) | | Answers true if an address is a global multicast address. Valid MCGlobal
IPv4 addresses are 224.0.1.0 - 238.255.255.255
boolean true, if the address is in the global multicast group,false otherwise |
isMCLinkLocal | public boolean isMCLinkLocal()(Code) | | Answers true if the address is a link-local address.The valid range for
IPv4 link-local addresses is: 224.0.0.0 to 239.0.0.255 Hence a mask of
111000000000000000000000 = 0xE00000
boolean |
isMCNodeLocal | public boolean isMCNodeLocal()(Code) | | Answers false for all IPv4 addresses. There are no valid IPv4 Node-local
addresses
boolean |
isMCOrgLocal | public boolean isMCOrgLocal()(Code) | | Answers true if the address is a organization-local address. The valid
range for IPv4 org-local addresses is: 239.192.0.0 to 239.195.255.255
Hence masks of 11101111 11000000 to 11101111 11000011 are valid. 0xEFC0
to 0xEFC3
true if org local address, false otherwise |
isMCSiteLocal | public boolean isMCSiteLocal()(Code) | | Answers true if the address is a site-local address.The valid range for
IPv4 site-local addresses is: 239.255.0.0 to 239.255.255.255 Hence a mask
of 11101111 11111111 = 0xEFFF.
boolean |
isMulticastAddress | public boolean isMulticastAddress()(Code) | | Answers true if the address is a multicast address. Valid IPv4 multicast
addresses are prefixed with 1110 = 0xE
boolean |
isSiteLocalAddress | public boolean isSiteLocalAddress()(Code) | | Answers whether this address has site-local scope. RFC 3484 Default
Address Selection for Internet Protocol version 6 (IPv6) states IPv4
private addresses, prefixes 10/8, 172.16/12, and 192.168/16, are assigned
site-local scope.
boolean |
Methods inherited from java.net.InetAddress | static int bytesToInt(byte bytes, int start)(Code)(Java Doc) CacheElement cacheElement()(Code)(Java Doc) static InetAddress createHostNameFromIPAddress(String ipAddressString) throws UnknownHostException(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public byte[] getAddress()(Code)(Java Doc) native static InetAddress[] getAliasesByNameImpl(String name) throws UnknownHostException(Code)(Java Doc) public static InetAddress[] getAllByName(String host) throws UnknownHostException(Code)(Java Doc) public static InetAddress getByAddress(byte[] ipAddress) throws UnknownHostException(Code)(Java Doc) static InetAddress getByAddress(byte[] ipAddress, int scope_id) throws UnknownHostException(Code)(Java Doc) public static InetAddress getByAddress(String hostName, byte[] ipAddress) throws UnknownHostException(Code)(Java Doc) static InetAddress getByAddressInternal(String hostName, byte[] ipAddress, int scope_id) throws UnknownHostException(Code)(Java Doc) public static InetAddress getByName(String host) throws UnknownHostException(Code)(Java Doc) public String getCanonicalHostName()(Code)(Java Doc) public String getHostAddress()(Code)(Java Doc) native static InetAddress getHostByAddrImpl(byte[] addr) throws UnknownHostException(Code)(Java Doc) native static InetAddress getHostByNameImpl(String name, boolean preferIPv6Address) throws UnknownHostException(Code)(Java Doc) public String getHostName()(Code)(Java Doc) native static String getHostNameImpl()(Code)(Java Doc) static String getHostNameInternal(String host) throws UnknownHostException(Code)(Java Doc) public static InetAddress getLocalHost() throws UnknownHostException(Code)(Java Doc) public int hashCode()(Code)(Java Doc) static int inetAddr(String host) throws UnknownHostException(Code)(Java Doc) native static int inetAddrImpl(String host) throws UnknownHostException(Code)(Java Doc) native static String inetNtoaImpl(int hipAddr)(Code)(Java Doc) static void intToBytes(int value, byte bytes, int start)(Code)(Java Doc) public boolean isAnyLocalAddress()(Code)(Java Doc) public boolean isLinkLocalAddress()(Code)(Java Doc) public boolean isLoopbackAddress()(Code)(Java Doc) public boolean isMCGlobal()(Code)(Java Doc) public boolean isMCLinkLocal()(Code)(Java Doc) public boolean isMCNodeLocal()(Code)(Java Doc) public boolean isMCOrgLocal()(Code)(Java Doc) public boolean isMCSiteLocal()(Code)(Java Doc) public boolean isMulticastAddress()(Code)(Java Doc) public boolean isReachable(int timeout) throws IOException(Code)(Java Doc) public boolean isReachable(NetworkInterface netif, int ttl, int timeout) throws IOException(Code)(Java Doc) public boolean isSiteLocalAddress()(Code)(Java Doc) static synchronized InetAddress lookupHostByName(String host) throws UnknownHostException(Code)(Java Doc) static boolean preferIPv6Addresses()(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|