text: //
  //  Generated by the J2ObjC translator.  DO NOT EDIT!
  //  source: android/platform/libcore/ojluni/src/main/java/javax/net/ssl/SNIHostName.java
  //
  
  #include "J2ObjC_header.h"
  
  #pragma push_macro("INCLUDE_ALL_JavaxNetSslSNIHostName")
  #ifdef RESTRICT_JavaxNetSslSNIHostName
  #define INCLUDE_ALL_JavaxNetSslSNIHostName 0
  #else
  #define INCLUDE_ALL_JavaxNetSslSNIHostName 1
  #endif
  #undef RESTRICT_JavaxNetSslSNIHostName
  
  #pragma clang diagnostic push
  #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
  
  #if __has_feature(nullability)
  #pragma clang diagnostic push
  #pragma GCC diagnostic ignored "-Wnullability"
  #pragma GCC diagnostic ignored "-Wnullability-completeness"
  #endif
  
  #if !defined (JavaxNetSslSNIHostName_) && (INCLUDE_ALL_JavaxNetSslSNIHostName || defined(INCLUDE_JavaxNetSslSNIHostName))
  #define JavaxNetSslSNIHostName_
  
  #define RESTRICT_JavaxNetSslSNIServerName 1
  #define INCLUDE_JavaxNetSslSNIServerName 1
  #include "javax/net/ssl/SNIServerName.h"
  
  @class IOSByteArray;
  @class JavaxNetSslSNIMatcher;
  
  /*!
   @brief Instances of this class represent a server name of type 
   <code>host_name</code> in a Server Name
    Indication (SNI) extension.
   <P>
    As described in section 3, "Server Name Indication", of 
   <A HREF="http://www.ietf.org/rfc/rfc6066.txt">TLS Extensions (RFC 6066)</A>,
    "HostName" contains the fully qualified DNS hostname of the server, as
    understood by the client.  The encoded server name value of a hostname is
    represented as a byte string using ASCII encoding without a trailing dot.
    This allows the support of Internationalized Domain Names (IDN) through
    the use of A-labels (the ASCII-Compatible Encoding (ACE) form of a valid
    string of Internationalized Domain Names for Applications (IDNA)) defined
    in <A HREF="http://www.ietf.org/rfc/rfc5890.txt">RFC 5890</A>.
    <P>
    Note that <code>SNIHostName</code> objects are immutable.
   - seealso: SNIServerName
   - seealso: StandardConstants#SNI_HOST_NAME
   @since 1.8
   */
  @interface JavaxNetSslSNIHostName : JavaxNetSslSNIServerName
  
  #pragma mark Public
  
  /*!
   @brief Creates an <code>SNIHostName</code> using the specified encoded value.
   <P>
    This method is normally used to parse the encoded name value in a
    requested SNI extension. 
   <P>
    Per <A HREF="http://www.ietf.org/rfc/rfc6066.txt">RFC 6066</A>,
    the encoded name value of a hostname is 
   <code>StandardCharsets.US_ASCII</code>-compliant.  However, in the previous
    version of the SNI extension ( 
   <A HREF="http://www.ietf.org/rfc/rfc4366.txt">RFC 4366</A>),
    the encoded hostname is represented as a byte string using UTF-8
    encoding.  For the purpose of version tolerance, this method allows
    that the charset of <code>encoded</code> argument can be 
   <code>StandardCharsets.UTF_8</code>, as well as 
   <code>StandardCharsets.US_ASCII</code>.  <code>IDN.toASCII(String)</code> is used
    to translate the <code>encoded</code> argument into ASCII Compatible
    Encoding (ACE) hostname. 
   <P>
    It is strongly recommended that this constructor is only used to parse
    the encoded name value in a requested SNI extension.  Otherwise, to
    comply with <A HREF="http://www.ietf.org/rfc/rfc6066.txt">RFC 6066</A>,
    please always use <code>StandardCharsets.US_ASCII</code>-compliant charset
    and enforce the restrictions on ASCII characters in hostnames (see 
   <A HREF="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</A>,
    <A HREF="http://www.ietf.org/rfc/rfc1122.txt">RFC 1122</A>,
    <A HREF="http://www.ietf.org/rfc/rfc1123.txt">RFC 1123</A>)
    for <code>encoded</code> argument, or use 
   <code>SNIHostName.SNIHostName(String)</code> instead. 
   <P>
    The <code>encoded</code> argument is illegal if it: 
   <ul>
    <li> <code>encoded</code> is empty,</li>
    <li> <code>encoded</code> ends with a trailing dot,</li>
    <li> <code>encoded</code> is not encoded in
         <code>StandardCharsets.US_ASCII</code> or
         <code>StandardCharsets.UTF_8</code>-compliant charset,</li>
    <li> <code>encoded</code> is not a valid Internationalized
         Domain Name (IDN) compliant with the RFC 3490 specification.</li>
    </ul>
    
   <P>
    Note that the <code>encoded</code> byte array is cloned
    to protect against subsequent modification.
   @param encoded the encoded hostname of this server name
   @throw NullPointerExceptionif <code>encoded</code> is <code>null</code>
   @throw IllegalArgumentExceptionif <code>encoded</code> is illegal
   */
  - (instancetype __nonnull)initWithByteArray:(IOSByteArray *)encoded;
  
  /*!
   @brief Creates an <code>SNIHostName</code> using the specified hostname.
   <P>
    Note that per <A HREF="http://www.ietf.org/rfc/rfc6066.txt">RFC 6066</A>,
    the encoded server name value of a hostname is 
   <code>StandardCharsets.US_ASCII</code>-compliant.  In this method, 
   <code>hostname</code> can be a user-friendly Internationalized Domain Name
    (IDN).  <code>IDN.toASCII(String, int)</code> is used to enforce the
    restrictions on ASCII characters in hostnames (see 
   <A HREF="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</A>,
    <A HREF="http://www.ietf.org/rfc/rfc1122.txt">RFC 1122</A>,
    <A HREF="http://www.ietf.org/rfc/rfc1123.txt">RFC 1123</A>) and
    translate the <code>hostname</code> into ASCII Compatible Encoding (ACE), as: 
   @code
  
        IDN.toASCII(hostname, IDN.USE_STD3_ASCII_RULES); 
    
  @endcode
    <P>
    The <code>hostname</code> argument is illegal if it: 
   <ul>
    <li> <code>hostname</code> is empty,</li>
    <li> <code>hostname</code> ends with a trailing dot,</li>
    <li> <code>hostname</code> is not a valid Internationalized
         Domain Name (IDN) compliant with the RFC 3490 specification.</li>
    </ul>
   @param hostname the hostname of this server name
   @throw NullPointerExceptionif <code>hostname</code> is <code>null</code>
   @throw IllegalArgumentExceptionif <code>hostname</code> is illegal
   */
  - (instancetype __nonnull)initWithNSString:(NSString *)hostname;
  
  /*!
   @brief Creates an <code>SNIMatcher</code> object for <code>SNIHostName</code>s.
   <P>
    This method can be used by a server to verify the acceptable 
   <code>SNIHostName</code>s.  For example, 
   @code
  
        SNIMatcher matcher =
            SNIHostName.createSNIMatcher("www\\.example\\.com"); 
    
  @endcode
    will accept the hostname "www.example.com". 
   @code
  
        SNIMatcher matcher =
            SNIHostName.createSNIMatcher("www\\.example\\.(com|org)"); 
    
  @endcode
    will accept hostnames "www.example.com" and "www.example.org".
   @param regex the 
    <a href="{@@docRoot}/java/util/regex/Pattern.html#sum">          regular expression pattern
    </a>          representing the hostname(s) to match
   @return a <code>SNIMatcher</code> object for <code>SNIHostName</code>s
   @throw NullPointerExceptionif <code>regex</code> is
            <code>null</code>
   @throw java.util.regex.PatternSyntaxExceptionif the regular expression's
            syntax is invalid
   */
  + (JavaxNetSslSNIMatcher *)createSNIMatcherWithNSString:(NSString *)regex;
  
  /*!
   @brief Compares this server name to the specified object.
   <P>
    Per <A HREF="http://www.ietf.org/rfc/rfc6066.txt">RFC 6066</A>, DNS
    hostnames are case-insensitive.  Two server hostnames are equal if,
    and only if, they have the same name type, and the hostnames are
    equal in a case-independent comparison.
   @param other the other server name object to compare with.
   @return true if, and only if, the <code>other</code> is considered
            equal to this instance
   */
  - (jboolean)isEqual:(id)other;
  
  /*!
   @brief Returns the <code>StandardCharsets.US_ASCII</code>-compliant hostname of
    this <code>SNIHostName</code> object.
   <P>
    Note that, per 
   <A HREF="http://www.ietf.org/rfc/rfc6066.txt">RFC 6066</A>, the
    returned hostname may be an internationalized domain name that
    contains A-labels. See 
   <A HREF="http://www.ietf.org/rfc/rfc5890.txt">RFC 5890</A>
    for more information about the detailed A-label specification.
   @return the <code>StandardCharsets.US_ASCII</code>-compliant hostname
            of this <code>SNIHostName</code> object
   */
  - (NSString *)getAsciiName;
  
  /*!
   @brief Returns a hash code value for this <code>SNIHostName</code>.
   <P>
    The hash code value is generated using the case-insensitive hostname
    of this <code>SNIHostName</code>.
   @return a hash code value for this <code>SNIHostName</code>.
   */
  - (NSUInteger)hash;
  
  /*!
   @brief Returns a string representation of the object, including the DNS
    hostname in this <code>SNIHostName</code> object.
   <P>
    The exact details of the representation are unspecified and subject
    to change, but the following may be regarded as typical: 
   @code
  
        "type=host_name (0), value=<hostname>"
     
  @endcode
    The "&lt;hostname&gt;" is an ASCII representation of the hostname,
    which may contains A-labels.  For example, a returned value of an pseudo
    hostname may look like: 
   @code
  
        "type=host_name (0), value=www.example.com" 
    
  @endcode
    or 
   @code
  
        "type=host_name (0), value=xn--fsqu00a.xn--0zwm56d" 
    
  @endcode
    <P>
    Please NOTE that the exact details of the representation are unspecified
    and subject to change.
   @return a string representation of the object.
   */
  - (NSString *)description;
  
  // Disallowed inherited constructors, do not use.
  
  - (instancetype __nonnull)initWithInt:(jint)arg0
                          withByteArray:(IOSByteArray *)arg1 NS_UNAVAILABLE;
  
  @end
  
  J2OBJC_EMPTY_STATIC_INIT(JavaxNetSslSNIHostName)
  
  FOUNDATION_EXPORT void JavaxNetSslSNIHostName_initWithNSString_(JavaxNetSslSNIHostName *self, NSString *hostname);
  
  FOUNDATION_EXPORT JavaxNetSslSNIHostName *new_JavaxNetSslSNIHostName_initWithNSString_(NSString *hostname) NS_RETURNS_RETAINED;
  
  FOUNDATION_EXPORT JavaxNetSslSNIHostName *create_JavaxNetSslSNIHostName_initWithNSString_(NSString *hostname);
  
  FOUNDATION_EXPORT void JavaxNetSslSNIHostName_initWithByteArray_(JavaxNetSslSNIHostName *self, IOSByteArray *encoded);
  
  FOUNDATION_EXPORT JavaxNetSslSNIHostName *new_JavaxNetSslSNIHostName_initWithByteArray_(IOSByteArray *encoded) NS_RETURNS_RETAINED;
  
  FOUNDATION_EXPORT JavaxNetSslSNIHostName *create_JavaxNetSslSNIHostName_initWithByteArray_(IOSByteArray *encoded);
  
  FOUNDATION_EXPORT JavaxNetSslSNIMatcher *JavaxNetSslSNIHostName_createSNIMatcherWithNSString_(NSString *regex);
  
  J2OBJC_TYPE_LITERAL_HEADER(JavaxNetSslSNIHostName)
  
  #endif
  
  
  #if __has_feature(nullability)
  #pragma clang diagnostic pop
  #endif
  
  #pragma clang diagnostic pop
  #pragma pop_macro("INCLUDE_ALL_JavaxNetSslSNIHostName")
  