+ public static long parseHostNameOrIPAddress(String aHostName) throws Exception {
+ InetAddress addr = InetAddress.getByName(aHostName.trim());
+ return
+ ((((long) addr.getAddress()[0])&255) << 24) +
+ ((((long) addr.getAddress()[1])&255) << 16) +
+ ((((long) addr.getAddress()[2])&255) << 8) +
+ ((((long) addr.getAddress()[3])&255));
+ }
+