示例#1
0
        static bool n_OnData_ILokio_BufferedSource_IZ(IntPtr jnienv, IntPtr native__this, int p0, IntPtr native_p1, int p2, bool p3)
        {
            global::Okhttp3.Internal.Http2.IPushObserver __this = global::Java.Lang.Object.GetObject <global::Okhttp3.Internal.Http2.IPushObserver> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::Okio.IBufferedSource p1 = (global::Okio.IBufferedSource)global::Java.Lang.Object.GetObject <global::Okio.IBufferedSource> (native_p1, JniHandleOwnership.DoNotTransfer);
            bool __ret = __this.OnData(p0, p1, p2, p3);

            return(__ret);
        }
        public static unsafe global::Java.Nio.Charset.Charset BomAwareCharset(global::Okio.IBufferedSource source, global::Java.Nio.Charset.Charset charset)
        {
            const string __id = "bomAwareCharset.(Lokio/BufferedSource;Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset;";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [2];
                __args [0] = new JniArgumentValue((source == null) ? IntPtr.Zero : ((global::Java.Lang.Object)source).Handle);
                __args [1] = new JniArgumentValue((charset == null) ? IntPtr.Zero : ((global::Java.Lang.Object)charset).Handle);
                var __rm = _members.StaticMethods.InvokeObjectMethod(__id, __args);
                return(global::Java.Lang.Object.GetObject <global::Java.Nio.Charset.Charset> (__rm.Handle, JniHandleOwnership.TransferLocalRef));
            } finally {
            }
        }
            public unsafe void Data(bool p0, int p1, global::Okio.IBufferedSource p2, int p3)
            {
                if (id_data_ZILokio_BufferedSource_I == IntPtr.Zero)
                {
                    id_data_ZILokio_BufferedSource_I = JNIEnv.GetMethodID(class_ref, "data", "(ZILokio/BufferedSource;I)V");
                }
                JValue *__args = stackalloc JValue [4];

                __args [0] = new JValue(p0);
                __args [1] = new JValue(p1);
                __args [2] = new JValue((p2 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p2).Handle);
                __args [3] = new JValue(p3);
                JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_data_ZILokio_BufferedSource_I, __args);
            }
 public static unsafe global::Okio.IBufferedSource Buffer(global::Okio.ISource p0)
 {
     if (id_buffer_Lokio_Source_ == IntPtr.Zero)
     {
         id_buffer_Lokio_Source_ = JNIEnv.GetStaticMethodID(class_ref, "buffer", "(Lokio/Source;)Lokio/BufferedSource;");
     }
     try {
         JValue *__args = stackalloc JValue [1];
         __args [0] = new JValue(p0);
         global::Okio.IBufferedSource __ret = global::Java.Lang.Object.GetObject <global::Okio.IBufferedSource> (JNIEnv.CallStaticObjectMethod(class_ref, id_buffer_Lokio_Source_, __args), JniHandleOwnership.TransferLocalRef);
         return(__ret);
     } finally {
     }
 }
示例#5
0
        public unsafe bool OnData(int p0, global::Okio.IBufferedSource p1, int p2, bool p3)
        {
            if (id_onData_ILokio_BufferedSource_IZ == IntPtr.Zero)
            {
                id_onData_ILokio_BufferedSource_IZ = JNIEnv.GetMethodID(class_ref, "onData", "(ILokio/BufferedSource;IZ)Z");
            }
            JValue *__args = stackalloc JValue [4];

            __args [0] = new JValue(p0);
            __args [1] = new JValue((p1 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p1).Handle);
            __args [2] = new JValue(p2);
            __args [3] = new JValue(p3);
            bool __ret = JNIEnv.CallBooleanMethod(((global::Java.Lang.Object) this).Handle, id_onData_ILokio_BufferedSource_IZ, __args);

            return(__ret);
        }
示例#6
0
            public unsafe Streams(bool client, global::Okio.IBufferedSource source, global::Okio.IBufferedSink sink)
                : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
            {
                const string __id = "(ZLokio/BufferedSource;Lokio/BufferedSink;)V";

                if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
                {
                    return;
                }

                try {
                    JniArgumentValue *__args = stackalloc JniArgumentValue [3];
                    __args [0] = new JniArgumentValue(client);
                    __args [1] = new JniArgumentValue((source == null) ? IntPtr.Zero : ((global::Java.Lang.Object)source).Handle);
                    __args [2] = new JniArgumentValue((sink == null) ? IntPtr.Zero : ((global::Java.Lang.Object)sink).Handle);
                    var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                    SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                    _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
                } finally {
                }
            }
        public unsafe RealResponseBody(string contentTypeString, long contentLength, global::Okio.IBufferedSource source)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Ljava/lang/String;JLokio/BufferedSource;)V";

            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_contentTypeString = JNIEnv.NewString(contentTypeString);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [3];
                __args [0] = new JniArgumentValue(native_contentTypeString);
                __args [1] = new JniArgumentValue(contentLength);
                __args [2] = new JniArgumentValue((source == null) ? IntPtr.Zero : ((global::Java.Lang.Object)source).Handle);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
                JNIEnv.DeleteLocalRef(native_contentTypeString);
            }
        }
 static void n_Data_ZILokio_BufferedSource_I(IntPtr jnienv, IntPtr native__this, bool p0, int p1, IntPtr native_p2, int p3)
 {
     global::Okhttp3.Internal.Http2.Http2Reader.IHandler __this = global::Java.Lang.Object.GetObject <global::Okhttp3.Internal.Http2.Http2Reader.IHandler> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Okio.IBufferedSource p2 = (global::Okio.IBufferedSource)global::Java.Lang.Object.GetObject <global::Okio.IBufferedSource> (native_p2, JniHandleOwnership.DoNotTransfer);
     __this.Data(p0, p1, p2, p3);
 }
示例#9
0
        public unsafe Http1Codec(global::Okhttp3.OkHttpClient client, global::Okhttp3.Internal.Connection.StreamAllocation streamAllocation, global::Okio.IBufferedSource source, global::Okio.IBufferedSink sink)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Lokhttp3/OkHttpClient;Lokhttp3/internal/connection/StreamAllocation;Lokio/BufferedSource;Lokio/BufferedSink;)V";

            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [4];
                __args [0] = new JniArgumentValue((client == null) ? IntPtr.Zero : ((global::Java.Lang.Object)client).Handle);
                __args [1] = new JniArgumentValue((streamAllocation == null) ? IntPtr.Zero : ((global::Java.Lang.Object)streamAllocation).Handle);
                __args [2] = new JniArgumentValue((source == null) ? IntPtr.Zero : ((global::Java.Lang.Object)source).Handle);
                __args [3] = new JniArgumentValue((sink == null) ? IntPtr.Zero : ((global::Java.Lang.Object)sink).Handle);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
            }
        }
示例#10
0
        public static unsafe global::Okhttp3.ResponseBody Create(global::Okhttp3.MediaType contentType, long contentLength, global::Okio.IBufferedSource content)
        {
            const string __id = "create.(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [3];
                __args [0] = new JniArgumentValue((contentType == null) ? IntPtr.Zero : ((global::Java.Lang.Object)contentType).Handle);
                __args [1] = new JniArgumentValue(contentLength);
                __args [2] = new JniArgumentValue((content == null) ? IntPtr.Zero : ((global::Java.Lang.Object)content).Handle);
                var __rm = _members.StaticMethods.InvokeObjectMethod(__id, __args);
                return(global::Java.Lang.Object.GetObject <global::Okhttp3.ResponseBody> (__rm.Handle, JniHandleOwnership.TransferLocalRef));
            } finally {
            }
        }