Resolving ip-address of a hostname
Posted in :
Take a look at InetAddress
and the getHostAddress()
method.
InetAddress address = InetAddress.getByName("www.example.com");
System.out.println(address.getHostAddress());
我要當一個豬頭,認真過每一天、快樂過每一天
Posted in :
Take a look at InetAddress
and the getHostAddress()
method.
InetAddress address = InetAddress.getByName("www.example.com");
System.out.println(address.getHostAddress());