Subversion Repositories javautils

Rev

Rev 4 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 13
Line 2... Line 2...
2
 
2
 
3
import java.util.Hashtable;
3
import java.util.Hashtable;
4
import javax.naming.*;
4
import javax.naming.*;
5
import javax.naming.directory.*;
5
import javax.naming.directory.*;
6
 
6
 
-
 
7
/**
-
 
8
 * This class performs DNS lookups.
-
 
9
 *
-
 
10
 * @author Rgagnon.com and Daniel Marschall
7
// Source: http://www.rgagnon.com/javadetails/java-0452.html
11
 * @see Source: http://www.rgagnon.com/javadetails/java-0452.html (Modified)
8
// Modified
12
 * @version 2010-06-14
9
 
13
 */
10
public class DNSLookup {
14
public class DNSLookup {
11
        public static int doLookup(String hostName, DNSType type)
15
        public static int doLookup(String hostName, DNSType type)
12
                        throws NamingException {
16
                        throws NamingException {
13
                Hashtable<String, String> env = new Hashtable<String, String>();
17
                Hashtable<String, String> env = new Hashtable<String, String>();
14
                env.put("java.naming.factory.initial",
18
                env.put("java.naming.factory.initial",