Java Utililty Methods DNS

List of utility methods to do DNS

  1. HOME
  2. Java
  3. D
  4. DNS

Description

The list of methods to do DNS are organized into topic(s).

Method

String getDnsDomainName()
Get the DNS domain name (eg: example.org).
return getDnsDomainName(InetAddress.getLocalHost().getCanonicalHostName());
String getDNSName(String s)
get DNS Name
if (!enableDNS)
 return s;
String s1;
try {
 InetAddress inetaddress = InetAddress.getByName(s);
 s1 = inetaddress.getHostName().trim();
} catch (UnknownHostException unknownhostexception) {
 s1 = s;
...
String resolveDNS(String dns)
resolve DNS
InetAddress addr = InetAddress.getByName(dns);
if (addr == null)
 return null;
return addr.getHostAddress();

AltStyle によって変換されたページ (->オリジナル) /