Class IPUtility

java.lang.Object
org.mariadb.jdbc.util.IPUtility

public class IPUtility extends Object
  • Constructor Details

    • IPUtility

      public IPUtility()
  • Method Details

    • isInetAddress

      public static boolean isInetAddress(String ipString)
    • stripTrailingDot

      public static String stripTrailingDot(String host)
      Remove the DNS root label marker from a hostname. A trailing dot marks a name as absolute for resolution only: it must be kept for DNS resolution, but removed for every TLS use of the name. RFC 6066 section 3 prohibits it in SNI, and certificates never carry it, so an IP literal written as 10.0.0.1. must be normalized before being recognized as an IP.
      Parameters:
      host - hostname, may be null
      Returns:
      hostname without any trailing dot