Here you can find the source of resolveDNS(String dns)
public static String resolveDNS(String dns) throws UnknownHostException
//package com.java2s; //The contents of this file are subject to the "Simplified BSD License" (the "License"); import java.net.InetAddress; import java.net.UnknownHostException; public class Main { public static String resolveDNS(String dns) throws UnknownHostException { InetAddress addr = InetAddress.getByName(dns); if (addr == null) return null; return addr.getHostAddress(); }// w w w . j a v a2 s. c o m }