Package rma.net

Class HostNameIPChecker

java.lang.Object
rma.net.HostNameIPChecker

public final class HostNameIPChecker extends Object
  • Method Details

    • areHostsSame

      public static boolean areHostsSame(String host1, String host2)
      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 compare
      host2 - The second host to compare
      Returns:
      true if the hosts resolve to the same IP address or hostname, false if it doesn't
    • isLocalhost

      public static boolean isLocalhost(String host)