beanshell : InetAddressTest.bsh
source("/sdcard/com.googlecode.bshforandroid/extras/bsh/android.bsh");
a = Android();
urlName = a.call("dialogGetInput","Inet Address Test","Input URL:").get("result");
print(urlName);
try {
if (urlName != null){
String host = urlName;
InetAddress[] addresses = InetAddress.getAllByName(host);
for (InetAddress a : addresses)
print(a);
}
else {
InetAddress localHostAddress = InetAddress.getLocalHost();
print(localHostAddress);
}
} catch (Exception e){
print(e);
}
bsh for android : Inet 地址 Test,布布扣,bubuko.com
bsh for android : Inet 地址 Test
原文:http://blog.csdn.net/belldeep/article/details/22982801