List of utility methods to do DNS
| 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(); |