/* DO NOT EDIT THIS FILE - it is machine generated (JCGO_116) */

#ifdef JCGO_SEPARATED
#define JCGO_116
#include "jcgortl.h"
#include "Main.h"
#endif

#ifdef JCGO_116

#ifdef CHKALL_java_net_InetAddress
#include "jcgobchk.h"
#endif

JCGO_NOSEP_INLINE java_net_InetAddress CFASTCALL
java_net_InetAddress__getByAddress__BA( jbyteArr addr )
{
 JCGO_CLINIT_TRIG(java_net_InetAddress__class);
 {
  return (java_net_InetAddress__getByAddress__LsBA(
   (java_lang_String)jnull, addr));
 }
}

JCGO_NOSEP_FRWINL java_net_InetAddress CFASTCALL
java_net_InetAddress__createAnyIf__( void )
{
 {
  jbyteArr JCGO_TRY_VOLATILE addr;
  java_net_InetAddress JCGO_TRY_VOLATILE anyIf;
  {
   JCGO_TRY_BLOCK
   {
    addr= (java_net_VMInetAddress__lookupInaddrAny__());
   }
   JCGO_TRY_LEAVE
   JCGO_TRY_CATCHES(1)
   JCGO_TRY_CATCH(OBJT_java_net_UnknownHostException, MAXT_java_net_UnknownHostException)
   {
    addr= (jbyteArr)jcgo_arrayClone((jObject)JCGO_OBJREF_OF(jcgo_array3_IntAddrs));
   }
   JCGO_TRY_RETHROW(1)
  }
  ;
  {
   JCGO_TRY_BLOCK
   {
    anyIf= (java_net_InetAddress__getByAddress__BA(
     addr));
   }
   JCGO_TRY_LEAVE
   JCGO_TRY_CATCHES(2)
   JCGO_TRY_CATCH(OBJT_java_net_UnknownHostException, MAXT_java_net_UnknownHostException)
   {
    java_net_UnknownHostException e;
    e= (java_net_UnknownHostException)JCGO_TRY_THROWABLE(0);
    JCGO_THROW_EXC((java_lang_InternalError)JCGO_CAST_OBJECT0(OBJT_java_lang_InternalError,
     MAXT_java_lang_InternalError, (java_lang_Throwable__initCause__Lt(
     (java_lang_Throwable)java_lang_InternalError__new__(), (java_lang_Throwable)e))));
   }
   JCGO_TRY_RETHROW(2)
  }
  return anyIf;
 }
}

JCGO_NOSEP_INLINE java_net_InetAddress CFASTCALL
java_net_InetAddress__getByLiteral__Ls( java_lang_String literal )
{
 {
  jbyteArr address;
  address= (java_net_VMInetAddress__aton__Ls(
   literal));
  if (address == jnull)
  {
   return (java_net_InetAddress)jnull;
  }
  {
   JCGO_TRY_BLOCK
   {
    {
     java_net_InetAddress jcgo_retval= (java_net_InetAddress__getByAddress__BA(
      address));
#ifndef JCGO_SEHTRY
     jcgo_tryLeave();
#endif
     return jcgo_retval;
    }
   }
   JCGO_TRY_LEAVE
   JCGO_TRY_CATCHES(1)
   JCGO_TRY_CATCH(OBJT_java_net_UnknownHostException, MAXT_java_net_UnknownHostException)
   {
    java_net_UnknownHostException e;
    e= (java_net_UnknownHostException)JCGO_TRY_THROWABLE(0);
    JCGO_THROW_EXC((java_lang_InternalError)JCGO_CAST_OBJECT0(OBJT_java_lang_InternalError,
     MAXT_java_lang_InternalError, (java_lang_Throwable__initCause__Lt(
     (java_lang_Throwable)java_lang_InternalError__new__(), (java_lang_Throwable)e))));
   }
   JCGO_TRY_RETHROW(1)
  }
 }
 return jnull;
}

JCGO_NOSEP_INLINE jObjectArr CFASTCALL
java_net_InetAddress__getAllByName__Ls( java_lang_String hostname
 )
{
 {
  java_net_InetAddress address;
  java_lang_SecurityManager sm;
  jObjectArr iplist;
  jObjectArr addresses;
  if (hostname == jnull || (java_lang_String__length__(
   hostname)) == 0)
  {
   jObject jcgo_rcvrL1;
   return (jcgo_rcvrL1= jcgo_newArray(JCGO_CLASSREF_OF(java_net_InetAddress__class),
    0, 1),
    JCGO_ARR_INTERNALACC(jObject, (jObjectArr)jcgo_rcvrL1, 0)= (jObject)java_net_InetAddress__LOCALHOST,
    (jObjectArr)jcgo_rcvrL1);
  }
  address= (java_net_InetAddress__getByLiteral__Ls(
   hostname));
  if (address != jnull)
  {
   jObject jcgo_rcvrL1;
   return (jcgo_rcvrL1= jcgo_newArray(JCGO_CLASSREF_OF(java_net_InetAddress__class),
    0, 1),
    JCGO_ARR_INTERNALACC(jObject, (jObjectArr)jcgo_rcvrL1, 0)= (jObject)address,
    (jObjectArr)jcgo_rcvrL1);
  }
  sm= (java_lang_System__getSecurityManager__());
  if (sm != jnull)
  {
   (java_lang_SecurityManager__checkConnect__LsI(
    sm, hostname, (-(jint)1)));
  }
  iplist= (java_net_ResolverCache__getHostByName__Ls(
   hostname));
  if (JCGO_ARRAY_LENGTH(iplist) == 0)
  {
   JCGO_THROW_EXC((java_net_UnknownHostException__new__Ls(
    hostname)));
  }
  addresses= (jObjectArr)jcgo_newArray(JCGO_CLASSREF_OF(java_net_InetAddress__class),
   0, JCGO_ARRAY_NZLENGTH(iplist));
  {
   jint i;
   i= 0;
   for (; i < JCGO_ARRAY_NZLENGTH(iplist); i++)
   {
    jObject jcgo_rcvrL1;
    jint jcgo_rcvrI1;
    (jcgo_rcvrL1= (jObject)addresses, jcgo_rcvrI1= i, JCGO_ARRAY_NZOBJSET(void,
     (jObjectArr)jcgo_rcvrL1, jcgo_rcvrI1, (java_net_InetAddress__getByAddress__LsBA(
     hostname, ((jbyteArr)JCGO_ARRAY_NZLACCESS(iplist, i))))));
   }
  }
  return addresses;
 }
}

JCGO_NOSEP_INLINE java_lang_String CFASTCALL
java_net_InetAddress__getCanonicalHostName__( java_net_InetAddress
 This )
{
 {
  java_lang_String hostname;
  java_lang_SecurityManager sm;
  hostname= (java_net_InetAddress__internalGetCanonicalHostName__(
   This));
  sm= (java_lang_System__getSecurityManager__());
  if (sm != jnull)
  {
   {
    JCGO_TRY_BLOCK
    {
     (java_lang_SecurityManager__checkConnect__LsI(
      sm, hostname, (-(jint)1)));
    }
    JCGO_TRY_LEAVE
    JCGO_TRY_CATCHES(1)
    JCGO_TRY_CATCH(OBJT_java_lang_SecurityException, MAXT_java_lang_SecurityException)
    {
     return (JCGO_CALL_NZVFUNC(This)->getHostAddress__(
      This));
    }
    JCGO_TRY_RETHROW(1)
   }
  }
  return hostname;
 }
}

JCGO_NOSEP_FRWINL java_lang_String CFASTCALL
java_net_InetAddress__internalGetCanonicalHostName__( java_net_InetAddress
 This )
{
 {
  {
   JCGO_TRY_BLOCK
   {
    {
     java_lang_String jcgo_retval= (java_net_ResolverCache__getHostByAddr__BA(
      JCGO_FIELD_NZACCESS(This, addr)));
#ifndef JCGO_SEHTRY
     jcgo_tryLeave();
#endif
     return jcgo_retval;
    }
   }
   JCGO_TRY_LEAVE
   JCGO_TRY_CATCHES(1)
   JCGO_TRY_CATCH(OBJT_java_net_UnknownHostException, MAXT_java_net_UnknownHostException)
   {
    return (JCGO_CALL_NZVFUNC(This)->getHostAddress__(
     This));
   }
   JCGO_TRY_RETHROW(1)
  }
 }
 return jnull;
}

JCGO_NOSEP_STATIC java_net_InetAddress CFASTCALL
java_net_InetAddress__this__BALsI( java_net_InetAddress This, jbyteArr
 ipaddr, java_lang_String hostname, jint family )
{
 {
  ;
  JCGO_FIELD_NZACCESS(This, addr)= (ipaddr == jnull)? jnull : (jbyteArr)JCGO_CAST_OBJECT0(OBJT_jbyte+OBJT_jarray,
   MAXT_jbyte+OBJT_jarray, (java_lang_Object__clone__(
   (java_lang_Object)ipaddr)));
  JCGO_FIELD_NZACCESS(This, hostName)= hostname;
  (void)family;
 }
 return This;
}

JCGO_NOSEP_INLINE java_lang_String CFASTCALL
java_net_InetAddress__getHostName__( java_net_InetAddress This )
{
 {
  if (JCGO_FIELD_NZACCESS(This, hostName) == jnull)
  {
   JCGO_FIELD_NZACCESS(This, hostName)= (java_net_InetAddress__getCanonicalHostName__(
    This));
  }
  return JCGO_FIELD_NZACCESS(This, hostName);
 }
}

JCGO_NOSEP_STATIC jint CFASTCALL
java_net_InetAddress__hashCode__( java_net_InetAddress This )
{
 {
  jint hash;
  jint len;
  jint i;
  hash= 0;
  len= JCGO_ARRAY_LENGTH(JCGO_FIELD_NZACCESS(This, addr));
  i= len > (jint)4? len - (jint)4 : 0;
  for (; i < len; i++)
  {
   hash= JCGO_SHL_F(hash, (jint)8) | ((jint)((unsigned char)(JCGO_ARRAY_BACCESS(JCGO_FIELD_NZACCESS(This,
    addr), i))));
  }
  return hash;
 }
}

JCGO_NOSEP_STATIC java_lang_String CFASTCALL
java_net_InetAddress__toString__X( java_net_InetAddress This, java_lang_String
 jcgo_stackparam )
{
 {
  java_lang_String addr;
  java_lang_String host;
  struct java_lang_StringBuilder_s jcgo_stackobj1;
  addr= (JCGO_CALL_NZVFUNC(This)->getHostAddress__(
   This));
  host= (JCGO_FIELD_NZACCESS(This, hostName) != jnull)? JCGO_FIELD_NZACCESS(This,
   hostName) : JCGO_STRREF_OF(jcgo_string3_String6D);
  return java_lang_String__this__L5dy9e(
   jcgo_stackparam, java_lang_StringBuilder__append__Ls(
   java_lang_StringBuilder__append__Ls(
   java_lang_StringBuilder__append__Ls(
   java_lang_StringBuilder__this__(
   JCGO_STACKOBJ_NEW(jcgo_stackobj1, java_lang_StringBuilder_methods)),
   host), JCGO_STRREF_OF(jcgo_string357_Mdclnt)), addr));
 }
}

JCGO_NOSEP_INLINE java_lang_String CFASTCALL
java_net_InetAddress__toString__( java_net_InetAddress This )
{
 return java_net_InetAddress__toString__X(This, (java_lang_String)jcgo_newObject((jvtable)&java_lang_String_methods));
}

JCGO_NOSEP_STATIC java_net_InetAddress CFASTCALL
java_net_InetAddress__getByAddress__LsBA( java_lang_String host, jbyteArr
 addr )
{
 {
  if (JCGO_ARRAY_LENGTH(addr) == (jint)4)
  {
   return (java_net_InetAddress)(java_net_Inet4Address__new__BALs(
    addr, host));
  }
  if (JCGO_ARRAY_NZLENGTH(addr) == (jint)16)
  {
   jbyteArr ip4addr;
   jbyte jcgo_rcvrB1;
   jcgo_arrtype4_IntAddrs jcgo_stackobj1;
   {
    jint i;
    i= 0;
    for (; i < (jint)12; i++)
    {
     if (JCGO_ARRAY_NZBACCESS(addr, i) != ((jbyte)(i < (jint)10? 0 :
      (jbyte)(jint)255)))
     {
      return (java_net_InetAddress)(java_net_Inet6Address__new__BALs(
       addr, host));
     }
    }
   }
   ip4addr= (jbyteArr)JCGO_STACKOBJ_PRIMARRNEW(jcgo_stackobj1, jbyteArr_methods,
    4);
   (jcgo_rcvrB1= JCGO_ARRAY_NZBACCESS(addr, (jint)12), JCGO_ARRAY_NZBACCESS(ip4addr,
    0)= jcgo_rcvrB1);
   (jcgo_rcvrB1= JCGO_ARRAY_NZBACCESS(addr, (jint)13), JCGO_ARRAY_NZBACCESS(ip4addr,
    (jint)1)= jcgo_rcvrB1);
   (jcgo_rcvrB1= JCGO_ARRAY_NZBACCESS(addr, (jint)14), JCGO_ARRAY_NZBACCESS(ip4addr,
    (jint)2)= jcgo_rcvrB1);
   (jcgo_rcvrB1= JCGO_ARRAY_NZBACCESS(addr, (jint)15), JCGO_ARRAY_NZBACCESS(ip4addr,
    (jint)3)= jcgo_rcvrB1);
   return (java_net_InetAddress)(java_net_Inet4Address__new__BALs(
    ip4addr, host));
  }
  JCGO_THROW_EXC((java_net_UnknownHostException__new__Ls(
   JCGO_STRREF_OF(jcgo_string5_IntAddrs))));
 }
 return jnull;
}

JCGO_NOSEP_STATIC java_net_InetAddress CFASTCALL
java_net_InetAddress__getByName__Ls( java_lang_String hostname )
{
 JCGO_CLINIT_TRIG(java_net_InetAddress__class);
 {
  jObjectArr addresses;
  addresses= (java_net_InetAddress__getAllByName__Ls(
   hostname));
  return ((java_net_InetAddress)JCGO_ARRAY_NZLACCESS(addresses, 0));
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
java_net_InetAddress__class__0( void )
{
 JCGO_CLINIT_BEGIN(java_net_InetAddress__class);
 java_net_InetAddress__LOCALHOST= (java_net_InetAddress)(java_net_Inet4Address__new__BALs(
  ((jbyteArr)JCGO_OBJREF_OF(jcgo_array2_IntAddrs)), JCGO_STRREF_OF(jcgo_string3_Handler)));
 java_net_InetAddress__ANY_IF= (java_net_InetAddress__createAnyIf__());
 JCGO_CLINIT_DONE(java_net_InetAddress__class);
}

JCGO_NOSEP_DATA CONST struct java_net_InetAddress_methods_s java_net_InetAddress_methods=
{
 JCGO_CLASSREF_OF(java_net_InetAddress__class),
 JCGO_GCJDESCR_ZEROINIT
 OBJT_java_net_InetAddress,
 (JCGO_OBJSIZE_T)sizeof(struct java_net_InetAddress_s),
 NULL,
 JCGO_CLINIT_INIT(java_net_InetAddress__class__0)
 0,
 0,
 java_net_InetAddress__hashCode__,
 java_net_InetAddress__toString__,
 java_lang_Object__finalize__,
 0,
 0
};

JCGO_NOSEP_DATA struct java_net_InetAddress_class_s java_net_InetAddress__class
 ATTRIBNONGC=
{
 {
  &java_lang_Class_methods,
  JCGO_MON_INIT
  JCGO_OBJREF_OF(*(java_lang_Object)&java_net_InetAddress_methods),
  JCGO_STRREF_OF(jcgo_string1_IntAddrs),
  JCGO_CLASSREF_OF(java_lang_Object__class),
  ((jObjectArr)JCGO_OBJREF_OF(jcgo_array3_Object)),
  0x1c1
 }
};

JCGO_NOSEP_GCDATA java_net_InetAddress java_net_InetAddress__LOCALHOST
 ATTRIBGCBSS= jnull;

JCGO_NOSEP_GCDATA java_net_InetAddress java_net_InetAddress__ANY_IF
 ATTRIBGCBSS= jnull;

JCGO_NOSEP_DATA CONST jcgo_arrtype4_IntAddrs jcgo_array2_IntAddrs=
{
 (jvtable)&jbyteArr_methods,
 JCGO_MON_INIT
 4,
 {
  (jbyte)(jint)127, (jbyte)0, (jbyte)0, (jbyte)(jint)1
 }
};

JCGO_NOSEP_DATA CONST jcgo_arrtype4_IntAddrs jcgo_array3_IntAddrs=
{
 (jvtable)&jbyteArr_methods,
 JCGO_MON_INIT
 4,
 {
  (jbyte)0, (jbyte)0, (jbyte)0, (jbyte)0
 }
};

JCGO_NOSEP_DATA CONST jcgo_arrtype23_Object jcgo_array6_IntAddrs=
{
 (jvtable)&jbyteArr_methods,
 JCGO_MON_INIT
 20,
 {
  (jbyte)(jchar)106/*'j'*/, (jbyte)(jchar)97/*'a'*/, (jbyte)(jchar)118/*'v'*/,
   (jbyte)(jchar)97/*'a'*/, (jbyte)(jchar)46/*'.'*/, (jbyte)(jchar)110/*'n'*/,
   (jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)116/*'t'*/, (jbyte)(jchar)46/*'.'*/,
   (jbyte)(jchar)73/*'I'*/, (jbyte)(jchar)110/*'n'*/, (jbyte)(jchar)101/*'e'*/,
   (jbyte)(jchar)116/*'t'*/, (jbyte)(jchar)65/*'A'*/, (jbyte)(jchar)100/*'d'*/,
   (jbyte)(jchar)100/*'d'*/, (jbyte)(jchar)114/*'r'*/, (jbyte)(jchar)101/*'e'*/,
   (jbyte)(jchar)115/*'s'*/, (jbyte)(jchar)115/*'s'*/
 }
};

JCGO_NOSEP_DATA CONST jcgo_arrtype86_GmCnnctn jcgo_array7_IntAddrs=
{
 (jvtable)&jbyteArr_methods,
 JCGO_MON_INIT
 29,
 {
  (jbyte)(jchar)73/*'I'*/, (jbyte)(jchar)80/*'P'*/, (jbyte)(jchar)32/*' '*/,
   (jbyte)(jchar)97/*'a'*/, (jbyte)(jchar)100/*'d'*/, (jbyte)(jchar)100/*'d'*/,
   (jbyte)(jchar)114/*'r'*/, (jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)115/*'s'*/,
   (jbyte)(jchar)115/*'s'*/, (jbyte)(jchar)32/*' '*/, (jbyte)(jchar)104/*'h'*/,
   (jbyte)(jchar)97/*'a'*/, (jbyte)(jchar)115/*'s'*/, (jbyte)(jchar)32/*' '*/,
   (jbyte)(jchar)105/*'i'*/, (jbyte)(jchar)108/*'l'*/, (jbyte)(jchar)108/*'l'*/,
   (jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)103/*'g'*/, (jbyte)(jchar)97/*'a'*/,
   (jbyte)(jchar)108/*'l'*/, (jbyte)(jchar)32/*' '*/, (jbyte)(jchar)108/*'l'*/,
   (jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)110/*'n'*/, (jbyte)(jchar)103/*'g'*/,
   (jbyte)(jchar)116/*'t'*/, (jbyte)(jchar)104/*'h'*/
 }
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string1_IntAddrs
 JCGO_THRD_ATTRNONGC=
{
 &java_lang_String_methods,
 JCGO_MON_INIT
 (java_lang_Object)JCGO_OBJREF_OF(jcgo_array6_IntAddrs),
 0, 20, (jint)0xd513ca03L
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string5_IntAddrs
 JCGO_THRD_ATTRNONGC=
{
 &java_lang_String_methods,
 JCGO_MON_INIT
 (java_lang_Object)JCGO_OBJREF_OF(jcgo_array7_IntAddrs),
 0, 29, (jint)0x63ec6b5bL
};

#ifdef CHKALL_java_net_InetAddress
#include "jcgochke.h"
#endif

#endif
