Class NetUtil

java.lang.Object
liquibase.util.NetUtil

public class NetUtil extends Object
  • Method Details

    • getLocalHostAddress

      public static String getLocalHostAddress()
      Returns:
      Machine's IP address
    • getLocalHostName

      public static String getLocalHostName()
      Returns:
      Machine's host name. This method can be better to call than getting it off getLocalHost() because sometimes the external address returned by that function does not have a useful hostname attached to it. This function will make sure a good value is returned.
    • isIPV4Compatible

      public static boolean isIPV4Compatible() throws SocketException, UnknownHostException
      Returns:
      true if local host address is compatible with IPv4 protocol
      Throws:
      SocketException
      UnknownHostException