android将域名转化为IP
我们只需要知道网页的域名,就可以将它转化为我们所需要的IP//将域名转换为IP
public static String GetInetAddress(String host){String IPAddress = ""; InetAddress ReturnStr1 = null;try {ReturnStr1 = java.net.InetAddress.getByName(host);IPAddress = ReturnStr1.getHostAddress();} catch (UnknownHostException e) {// TODO Auto-generated catch blocke.printStackTrace();return IPAddress;}return IPAddress;}?