/* 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_gnu_java_net_PlainSocketImpl
#include "jcgobchk.h"
#endif

JCGO_NOSEP_INLINE jint CFASTCALL
gnu_java_net_PlainSocketImpl_SocketInputStream__available__( gnu_java_net_PlainSocketImpl_SocketInputStream
 This )
{
 {
  return (gnu_java_net_PlainSocketImpl__available__(
   JCGO_FIELD_NZACCESS(This, this_0)));
 }
}

JCGO_NOSEP_INLINE void CFASTCALL
gnu_java_net_PlainSocketImpl_SocketInputStream__close__( gnu_java_net_PlainSocketImpl_SocketInputStream
 This )
{
 {
  (gnu_java_net_PlainSocketImpl__close__(
   JCGO_FIELD_NZACCESS(This, this_0)));
 }
}

JCGO_NOSEP_STATIC jint CFASTCALL
gnu_java_net_PlainSocketImpl_SocketInputStream__read__( gnu_java_net_PlainSocketImpl_SocketInputStream
 This )
{
 {
  if (JCGO_FIELD_NZACCESS(JCGO_FIELD_NZACCESS(This, this_0), channel) ==
   jnull)
  {
   JCGO_THROW_EXC((java_net_SocketException__new__Ls(
    JCGO_STRREF_OF(jcgo_string2_ScktHndl))));
  }
  while (jtrue)
  {
   {
    JCGO_TRY_BLOCK
    {
     jObject jcgo_rcvrL1;
     {
      jint jcgo_retval= (jcgo_rcvrL1= (jObject)(jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(JCGO_FIELD_NZACCESS(This,
       this_0), channel), JCGO_CALL_FINALF((gnu_java_nio_SocketChannelImpl)jcgo_rcvrL1)
       gnu_java_nio_SocketChannelImpl__getVMChannel__(
       (gnu_java_nio_SocketChannelImpl)jcgo_rcvrL1)), JCGO_CALL_FINALF((gnu_java_nio_VMChannel)jcgo_rcvrL1)
       gnu_java_nio_VMChannel__read__(
       (gnu_java_nio_VMChannel)jcgo_rcvrL1));
#ifndef JCGO_SEHTRY
      jcgo_tryLeave();
#endif
      return jcgo_retval;
     }
    }
    JCGO_TRY_LEAVE
    JCGO_TRY_CATCHES(1)
    JCGO_TRY_CATCH(OBJT_java_net_SocketTimeoutException, MAXT_java_net_SocketTimeoutException)
    {
     java_net_SocketTimeoutException ste;
     ste= (java_net_SocketTimeoutException)JCGO_TRY_THROWABLE(0);
     JCGO_THROW_EXC(ste);
    }
    JCGO_TRY_CATCH(OBJT_java_io_InterruptedIOException, MAXT_java_io_InterruptedIOException)
    {
    }
    JCGO_TRY_RETHROW(1)
   }
  }
 }
 return (jint)0;
}

JCGO_NOSEP_STATIC jint CFASTCALL
gnu_java_net_PlainSocketImpl_SocketInputStream__read__BAII( gnu_java_net_PlainSocketImpl_SocketInputStream
 This, jbyteArr buf, jint offset, jint len )
{
 {
  java_nio_ByteBuffer b;
  struct java_nio_ByteBufferImpl_s jcgo_stackobj1;
  if (JCGO_FIELD_NZACCESS(JCGO_FIELD_NZACCESS(This, this_0), channel) ==
   jnull)
  {
   JCGO_THROW_EXC((java_net_SocketException__new__Ls(
    JCGO_STRREF_OF(jcgo_string2_ScktHndl))));
  }
  b= (java_nio_ByteBuffer__wrap__BAIIX(
   buf, offset, len, JCGO_STACKOBJVLT_NEW(jcgo_stackobj1, java_nio_ByteBufferImpl_methods)));
  while (jtrue)
  {
   {
    JCGO_TRY_BLOCK
    {
     jObject jcgo_rcvrL1;
     {
      jint jcgo_retval= (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(JCGO_FIELD_NZACCESS(This,
       this_0), channel), JCGO_CALL_FINALF((gnu_java_nio_SocketChannelImpl)jcgo_rcvrL1)
       gnu_java_nio_SocketChannelImpl__read__L9oaia(
       (gnu_java_nio_SocketChannelImpl)jcgo_rcvrL1, b));
#ifndef JCGO_SEHTRY
      jcgo_tryLeave();
#endif
      return jcgo_retval;
     }
    }
    JCGO_TRY_LEAVE
    JCGO_TRY_CATCHES(1)
    JCGO_TRY_CATCH(OBJT_java_net_SocketTimeoutException, MAXT_java_net_SocketTimeoutException)
    {
     java_net_SocketTimeoutException ste;
     ste= (java_net_SocketTimeoutException)JCGO_TRY_THROWABLE(0);
     JCGO_THROW_EXC(ste);
    }
    JCGO_TRY_CATCH(OBJT_java_io_InterruptedIOException, MAXT_java_io_InterruptedIOException)
    {
    }
    JCGO_TRY_RETHROW(1)
   }
  }
 }
 return (jint)0;
}

JCGO_NOSEP_INLINE gnu_java_net_PlainSocketImpl_SocketInputStream CFASTCALL
gnu_java_net_PlainSocketImpl_SocketInputStream__this__L81fmm( gnu_java_net_PlainSocketImpl_SocketInputStream
 This, gnu_java_net_PlainSocketImpl this_0 )
{
 {
  JCGO_FIELD_NZACCESS(This, this_0)= this_0;
  (java_io_InputStream__this__((java_io_InputStream)This));
 }
 return This;
}

JCGO_NOSEP_INLINE gnu_java_net_PlainSocketImpl_SocketInputStream CFASTCALL
gnu_java_net_PlainSocketImpl_SocketInputStream__new__L81fmm( gnu_java_net_PlainSocketImpl
 this_0 )
{
 return gnu_java_net_PlainSocketImpl_SocketInputStream__this__L81fmm(
  (gnu_java_net_PlainSocketImpl_SocketInputStream)jcgo_newObject((jvtable)&gnu_java_net_PlainSocketImpl_SocketInputStream_methods),
  this_0);
}

JCGO_NOSEP_DATA CONST struct gnu_java_net_PlainSocketImpl_SocketInputStream_methods_s
 gnu_java_net_PlainSocketImpl_SocketInputStream_methods=
{
 JCGO_CLASSREF_OF(gnu_java_net_PlainSocketImpl_SocketInputStream__class),
 JCGO_GCJDESCR_ZEROINIT
 OBJT_gnu_java_net_PlainSocketImpl_SocketInputStream,
 (JCGO_OBJSIZE_T)sizeof(struct gnu_java_net_PlainSocketImpl_SocketInputStream_s),
 NULL,
 JCGO_CLINIT_INIT(0)
 0,
 java_lang_Object__equals__Lo,
 java_lang_Object__hashCode__,
 java_lang_Object__toString__,
 java_lang_Object__finalize__,
 gnu_java_net_PlainSocketImpl_SocketInputStream__available__,
 gnu_java_net_PlainSocketImpl_SocketInputStream__close__,
 gnu_java_net_PlainSocketImpl_SocketInputStream__read__,
 gnu_java_net_PlainSocketImpl_SocketInputStream__read__BAII
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct gnu_java_net_PlainSocketImpl_SocketInputStream_class_s
 gnu_java_net_PlainSocketImpl_SocketInputStream__class JCGO_THRD_ATTRNONGC=
{
 {
  &java_lang_Class_methods,
  JCGO_MON_INIT
  JCGO_OBJREF_OF(*(java_lang_Object)&gnu_java_net_PlainSocketImpl_SocketInputStream_methods),
  JCGO_STRREF_OF(jcgo_string1_ScktInSt),
  JCGO_CLASSREF_OF(java_io_InputStream__class),
  ((jObjectArr)JCGO_OBJREF_OF(jcgo_array3_Object)),
  0x10
 }
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string1_ScktInSt
 JCGO_THRD_ATTRNONGC=
{
 &java_lang_String_methods,
 JCGO_MON_INIT
 (java_lang_Object)JCGO_OBJREF_OF(jcgo_array4_PlnSckIm),
 0, 46, (jint)0x8ba14d93L
};

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

#endif
