com.lavantech.net.dns
Class FindNameServer
java.lang.Object
com.lavantech.net.dns.FindNameServer
- public class FindNameServer
- extends java.lang.Object
FindNameServer searchs for the DNS Server setting on the local machine. This class is used by the
DNSLookup class to find the default server for the local machine when the server name is not provided (null is passed).
This class first checks for System.getProperty("dns.server"). If this property is set, the list of servers(separated by ',')
in this property is used. If the system property is not set, it looks on the
platform specific file/command for the DNS setting.
Method Summary |
static java.lang.String[] |
getServers()
Returns all nameserver configured on the system. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FindNameServer
public FindNameServer()
getServers
public static java.lang.String[] getServers()
throws java.lang.Exception
- Returns all nameserver configured on the system.
- Returns:
- An array of name servers setup on the local machine.
- Throws:
java.lang.Exception
main
public static void main(java.lang.String[] args)