Package rma.net
Class HostNameIPChecker
java.lang.Object
rma.net.HostNameIPChecker
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
areHostsSame
(String host1, String host2) This compares if two hostnames or IP addresses resolve to the same machine.static boolean
isLocalhost
(String host)
-
Method Details
-
areHostsSame
This compares if two hostnames or IP addresses resolve to the same machine. It may make DNS requests, so do it is not recommended to run it in a UI thread- Parameters:
host1
- The first host to comparehost2
- The second host to compare- Returns:
- true if the hosts resolve to the same IP address or hostname, false if it doesn't
-
isLocalhost
-