|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.mansoft.Utils
public class Utils
The Utils
class contains static utility methods for jipv6.
Utils.
Method Summary | |
---|---|
static InetAddress |
getByName(String hostName)
Determines the IP address of a host, given the host's name. |
static InetAddress |
getByNameXbill(String hostName)
Determines the IPv6 address of a host, given the host's name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static InetAddress getByNameXbill(String hostName) throws UnknownHostException
hostName
- the specified host, or null
.
UnknownHostException
- if no IP address for the
hostName
could be found, or if a scope_id was specified
for a global IPv6 address.
SecurityException
- if a security manager exists
and its checkConnect method doesn't allow the operationpublic static InetAddress getByName(String hostName) throws UnknownHostException
InetAddress.getByName(String hostName)
The host name can either be a machine name, such as
"java.sun.com
", or a textual representation of its
IP address. If a literal IP address is supplied, only the
validity of the address format is checked.
For host
specified in literal IPv6 address,
either the form defined in RFC 2732 or the literal IPv6 address
format defined in RFC 2373 is accepted. IPv6 scoped addresses are also
supported. See here for a description of IPv6
scoped addresses.
If the host is null then an InetAddress representing an address of the loopback interface is returned. See RFC 3330 section 2 and RFC 2373 section 2.5.3.
hostName
- the specified host, or null
.
UnknownHostException
- if no IP address for the
host
could be found, or if a scope_id was specified
for a global IPv6 address.
SecurityException
- if a security manager exists
and its checkConnect method doesn't allow the operation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |