static long n_Read_Lokio_Buffer_J (IntPtr jnienv, IntPtr native__this, IntPtr native_p0, long p1)
		{
			global::Okio.ISource __this = global::Java.Lang.Object.GetObject<global::Okio.ISource> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
			global::Okio.Buffer p0 = global::Java.Lang.Object.GetObject<global::Okio.Buffer> (native_p0, JniHandleOwnership.DoNotTransfer);
			long __ret = __this.Read (p0, p1);
			return __ret;
		}
        static long n_Read_Lokio_Buffer_J(IntPtr jnienv, IntPtr native__this, IntPtr native_sink, long byteCount)
        {
            global::Okio.ForwardingSource __this = global::Java.Lang.Object.GetObject <global::Okio.ForwardingSource> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::Okio.Buffer           sink   = global::Java.Lang.Object.GetObject <global::Okio.Buffer> (native_sink, JniHandleOwnership.DoNotTransfer);
            long __ret = __this.Read(sink, byteCount);

            return(__ret);
        }
		public unsafe long Read (global::Okio.Buffer p0, long p1)
		{
			if (id_read_Lokio_Buffer_J == IntPtr.Zero)
				id_read_Lokio_Buffer_J = JNIEnv.GetMethodID (class_ref, "read", "(Lokio/Buffer;J)J");
			JValue* __args = stackalloc JValue [2];
			__args [0] = new JValue ((p0 == null) ? IntPtr.Zero : ((global::Java.Lang.Object) p0).Handle);
			__args [1] = new JValue (p1);
			long __ret = JNIEnv.CallLongMethod (((global::Java.Lang.Object) this).Handle, id_read_Lokio_Buffer_J, __args);
			return __ret;
		}
        public unsafe void Write(global::Okio.Buffer p0, long p1)
        {
            if (id_write_Lokio_Buffer_J == IntPtr.Zero)
            {
                id_write_Lokio_Buffer_J = JNIEnv.GetMethodID(class_ref, "write", "(Lokio/Buffer;J)V");
            }
            JValue *__args = stackalloc JValue [2];

            __args [0] = new JValue(p0);
            __args [1] = new JValue(p1);
            JNIEnv.CallVoidMethod(Handle, id_write_Lokio_Buffer_J, __args);
        }
        public virtual unsafe void Write(global::Okio.Buffer source, long byteCount)
        {
            const string __id = "write.(Lokio/Buffer;J)V";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [2];
                __args [0] = new JniArgumentValue((source == null) ? IntPtr.Zero : ((global::Java.Lang.Object)source).Handle);
                __args [1] = new JniArgumentValue(byteCount);
                _members.InstanceMethods.InvokeVirtualVoidMethod(__id, this, __args);
            } finally {
            }
        }
            public unsafe long Read(global::Okio.Buffer sink, long byteCount)
            {
                const string __id = "read.(Lokio/Buffer;J)J";

                try {
                    JniArgumentValue *__args = stackalloc JniArgumentValue [2];
                    __args [0] = new JniArgumentValue((sink == null) ? IntPtr.Zero : ((global::Java.Lang.Object)sink).Handle);
                    __args [1] = new JniArgumentValue(byteCount);
                    var __rm = _members.InstanceMethods.InvokeAbstractInt64Method(__id, this, __args);
                    return(__rm);
                } finally {
                }
            }
        public unsafe long Read(global::Okio.Buffer p0, long p1)
        {
            if (id_read_Lokio_Buffer_J == IntPtr.Zero)
            {
                id_read_Lokio_Buffer_J = JNIEnv.GetMethodID(class_ref, "read", "(Lokio/Buffer;J)J");
            }
            JValue *__args = stackalloc JValue [2];

            __args [0] = new JValue(p0);
            __args [1] = new JValue(p1);
            long __ret = JNIEnv.CallLongMethod(Handle, id_read_Lokio_Buffer_J, __args);

            return(__ret);
        }
        public virtual unsafe void Write(global::Okio.Buffer p0, long p1)
        {
            if (id_write_Lokio_Buffer_J == IntPtr.Zero)
            {
                id_write_Lokio_Buffer_J = JNIEnv.GetMethodID(class_ref, "write", "(Lokio/Buffer;J)V");
            }
            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(p1);

                if (GetType() == ThresholdType)
                {
                    JNIEnv.CallVoidMethod(Handle, id_write_Lokio_Buffer_J, __args);
                }
                else
                {
                    JNIEnv.CallNonvirtualVoidMethod(Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "write", "(Lokio/Buffer;J)V"), __args);
                }
            } finally {
            }
        }
Beispiel #9
0
        public virtual unsafe long Read(global::Okio.Buffer p0, long p1)
        {
            if (id_read_Lokio_Buffer_J == IntPtr.Zero)
            {
                id_read_Lokio_Buffer_J = JNIEnv.GetMethodID(class_ref, "read", "(Lokio/Buffer;J)J");
            }
            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(p1);

                long __ret;
                if (GetType() == ThresholdType)
                {
                    __ret = JNIEnv.CallLongMethod(Handle, id_read_Lokio_Buffer_J, __args);
                }
                else
                {
                    __ret = JNIEnv.CallNonvirtualLongMethod(Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "read", "(Lokio/Buffer;J)J"), __args);
                }
                return(__ret);
            } finally {
            }
        }
 static void n_Write_Lokio_Buffer_J(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, long p1)
 {
     global::Okio.ISink  __this = global::Java.Lang.Object.GetObject <global::Okio.ISink> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Okio.Buffer p0     = global::Java.Lang.Object.GetObject <global::Okio.Buffer> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.Write(p0, p1);
 }
 static void n_Write_Lokio_Buffer_J(IntPtr jnienv, IntPtr native__this, IntPtr native_source, long byteCount)
 {
     global::Okio.ForwardingSink __this = global::Java.Lang.Object.GetObject <global::Okio.ForwardingSink> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Okio.Buffer         source = global::Java.Lang.Object.GetObject <global::Okio.Buffer> (native_source, JniHandleOwnership.DoNotTransfer);
     __this.Write(source, byteCount);
 }