public unsafe global::Okhttp3.MultipartBody.Builder SetType(global::Okhttp3.MediaType type) { const string __id = "setType.(Lokhttp3/MediaType;)Lokhttp3/MultipartBody$Builder;"; try { JniArgumentValue *__args = stackalloc JniArgumentValue [1]; __args [0] = new JniArgumentValue((type == null) ? IntPtr.Zero : ((global::Java.Lang.Object)type).Handle); var __rm = _members.InstanceMethods.InvokeAbstractObjectMethod(__id, this, __args); return(global::Java.Lang.Object.GetObject <global::Okhttp3.MultipartBody.Builder> (__rm.Handle, JniHandleOwnership.TransferLocalRef)); } finally { } }
public static unsafe global::Okhttp3.RequestBody Create(global::Okhttp3.MediaType contentType, global::Java.IO.File file) { const string __id = "create.(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;"; try { JniArgumentValue *__args = stackalloc JniArgumentValue [2]; __args [0] = new JniArgumentValue((contentType == null) ? IntPtr.Zero : ((global::Java.Lang.Object)contentType).Handle); __args [1] = new JniArgumentValue((file == null) ? IntPtr.Zero : ((global::Java.Lang.Object)file).Handle); var __rm = _members.StaticMethods.InvokeObjectMethod(__id, __args); return(global::Java.Lang.Object.GetObject <global::Okhttp3.RequestBody> (__rm.Handle, JniHandleOwnership.TransferLocalRef)); } finally { } }
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 { } }
public static unsafe global::Okhttp3.RequestBody Create(global::Okhttp3.MediaType contentType, string content) { const string __id = "create.(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;"; IntPtr native_content = JNIEnv.NewString(content); try { JniArgumentValue *__args = stackalloc JniArgumentValue [2]; __args [0] = new JniArgumentValue((contentType == null) ? IntPtr.Zero : ((global::Java.Lang.Object)contentType).Handle); __args [1] = new JniArgumentValue(native_content); var __rm = _members.StaticMethods.InvokeObjectMethod(__id, __args); return(global::Java.Lang.Object.GetObject <global::Okhttp3.RequestBody> (__rm.Handle, JniHandleOwnership.TransferLocalRef)); } finally { JNIEnv.DeleteLocalRef(native_content); } }
public static unsafe global::Okhttp3.RequestBody Create(global::Okhttp3.MediaType contentType, byte[] content, int offset, int byteCount) { const string __id = "create.(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;"; IntPtr native_content = JNIEnv.NewArray(content); try { JniArgumentValue *__args = stackalloc JniArgumentValue [4]; __args [0] = new JniArgumentValue((contentType == null) ? IntPtr.Zero : ((global::Java.Lang.Object)contentType).Handle); __args [1] = new JniArgumentValue(native_content); __args [2] = new JniArgumentValue(offset); __args [3] = new JniArgumentValue(byteCount); var __rm = _members.StaticMethods.InvokeObjectMethod(__id, __args); return(global::Java.Lang.Object.GetObject <global::Okhttp3.RequestBody> (__rm.Handle, JniHandleOwnership.TransferLocalRef)); } finally { if (content != null) { JNIEnv.CopyArray(native_content, content); JNIEnv.DeleteLocalRef(native_content); } } }