public override unsafe void WriteTo(global::Okio.IBufferedSink sink)
        {
            const string __id = "writeTo.(Lokio/BufferedSink;)V";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [1];
                __args [0] = new JniArgumentValue((sink == null) ? IntPtr.Zero : ((global::Java.Lang.Object)sink).Handle);
                _members.InstanceMethods.InvokeAbstractVoidMethod(__id, this, __args);
            } finally {
            }
        }
 public static unsafe global::Okio.IBufferedSink Buffer(global::Okio.ISink p0)
 {
     if (id_buffer_Lokio_Sink_ == IntPtr.Zero)
     {
         id_buffer_Lokio_Sink_ = JNIEnv.GetStaticMethodID(class_ref, "buffer", "(Lokio/Sink;)Lokio/BufferedSink;");
     }
     try {
         JValue *__args = stackalloc JValue [1];
         __args [0] = new JValue(p0);
         global::Okio.IBufferedSink __ret = global::Java.Lang.Object.GetObject <global::Okio.IBufferedSink> (JNIEnv.CallStaticObjectMethod(class_ref, id_buffer_Lokio_Sink_, __args), JniHandleOwnership.TransferLocalRef);
         return(__ret);
     } finally {
     }
 }
示例#3
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 {
                }
            }
示例#4
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 {
            }
        }
 public abstract void WriteTo(global::Okio.IBufferedSink p0);
 static void n_WriteTo_Lokio_BufferedSink_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Okhttp3.RequestBody __this = global::Java.Lang.Object.GetObject <global::Okhttp3.RequestBody> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Okio.IBufferedSink  p0     = (global::Okio.IBufferedSink)global::Java.Lang.Object.GetObject <global::Okio.IBufferedSink> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.WriteTo(p0);
 }