Package org.conscrypt

Class AddressUtils


  • final class AddressUtils
    extends java.lang.Object
    Utilities to check whether IP addresses meet some criteria.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String IP_PATTERN  
      private static java.util.regex.Pattern ipPattern  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AddressUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static boolean isLiteralIpAddress​(java.lang.String hostname)
      Returns true if the supplied hostname is an literal IP address.
      (package private) static boolean isValidSniHostname​(java.lang.String sniHostname)
      Returns true when the supplied hostname is valid for SNI purposes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ipPattern

        private static java.util.regex.Pattern ipPattern
    • Constructor Detail

      • AddressUtils

        private AddressUtils()
    • Method Detail

      • isValidSniHostname

        static boolean isValidSniHostname​(java.lang.String sniHostname)
        Returns true when the supplied hostname is valid for SNI purposes.
      • isLiteralIpAddress

        static boolean isLiteralIpAddress​(java.lang.String hostname)
        Returns true if the supplied hostname is an literal IP address.