Class IPUtility
java.lang.Object
org.mariadb.jdbc.util.IPUtility
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisInetAddress(String ipString) static StringstripTrailingDot(String host) Remove the DNS root label marker from a hostname.
-
Constructor Details
-
IPUtility
public IPUtility()
-
-
Method Details
-
isInetAddress
-
stripTrailingDot
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 as10.0.0.1.must be normalized before being recognized as an IP.- Parameters:
host- hostname, may be null- Returns:
- hostname without any trailing dot
-