jni-android-sys 0.0.10

Autogenerated glue code for access Android JVM APIs from Rust
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "java-nio-channels-AsynchronousByteChannel"))]
__jni_bindgen! {
    /// public interface [AsynchronousByteChannel](https://developer.android.com/reference/java/nio/channels/AsynchronousByteChannel.html)
    ///
    /// Required feature: "java-nio-channels-AsynchronousByteChannel"
    public interface AsynchronousByteChannel ("java/nio/channels/AsynchronousByteChannel") extends crate::java::lang::Object, implements crate::java::nio::channels::AsynchronousChannel {

        /// [read](https://developer.android.com/reference/java/nio/channels/AsynchronousByteChannel.html#read(java.nio.ByteBuffer,%20java.lang.Object,%20java.nio.channels.CompletionHandler))
        ///
        /// Required features: "java-lang-Object", "java-nio-ByteBuffer", "java-nio-channels-CompletionHandler"
        #[cfg(any(feature = "all", all(feature = "java-lang-Object", feature = "java-nio-ByteBuffer", feature = "java-nio-channels-CompletionHandler")))]
        pub fn read_ByteBuffer_Object_CompletionHandler<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::nio::ByteBuffer>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Object>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::nio::channels::CompletionHandler>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousByteChannel", java.flags == PUBLIC | ABSTRACT, .name == "read", .descriptor == "(Ljava/nio/ByteBuffer;Ljava/lang/Object;Ljava/nio/channels/CompletionHandler;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/nio/channels/AsynchronousByteChannel\0", "read\0", "(Ljava/nio/ByteBuffer;Ljava/lang/Object;Ljava/nio/channels/CompletionHandler;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [read](https://developer.android.com/reference/java/nio/channels/AsynchronousByteChannel.html#read(java.nio.ByteBuffer))
        ///
        /// Required features: "java-nio-ByteBuffer", "java-util-concurrent-Future"
        #[cfg(any(feature = "all", all(feature = "java-nio-ByteBuffer", feature = "java-util-concurrent-Future")))]
        pub fn read_ByteBuffer<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::nio::ByteBuffer>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::Future>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousByteChannel", java.flags == PUBLIC | ABSTRACT, .name == "read", .descriptor == "(Ljava/nio/ByteBuffer;)Ljava/util/concurrent/Future;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/nio/channels/AsynchronousByteChannel\0", "read\0", "(Ljava/nio/ByteBuffer;)Ljava/util/concurrent/Future;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [write](https://developer.android.com/reference/java/nio/channels/AsynchronousByteChannel.html#write(java.nio.ByteBuffer,%20java.lang.Object,%20java.nio.channels.CompletionHandler))
        ///
        /// Required features: "java-lang-Object", "java-nio-ByteBuffer", "java-nio-channels-CompletionHandler"
        #[cfg(any(feature = "all", all(feature = "java-lang-Object", feature = "java-nio-ByteBuffer", feature = "java-nio-channels-CompletionHandler")))]
        pub fn write_ByteBuffer_Object_CompletionHandler<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::nio::ByteBuffer>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Object>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::nio::channels::CompletionHandler>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousByteChannel", java.flags == PUBLIC | ABSTRACT, .name == "write", .descriptor == "(Ljava/nio/ByteBuffer;Ljava/lang/Object;Ljava/nio/channels/CompletionHandler;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/nio/channels/AsynchronousByteChannel\0", "write\0", "(Ljava/nio/ByteBuffer;Ljava/lang/Object;Ljava/nio/channels/CompletionHandler;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [write](https://developer.android.com/reference/java/nio/channels/AsynchronousByteChannel.html#write(java.nio.ByteBuffer))
        ///
        /// Required features: "java-nio-ByteBuffer", "java-util-concurrent-Future"
        #[cfg(any(feature = "all", all(feature = "java-nio-ByteBuffer", feature = "java-util-concurrent-Future")))]
        pub fn write_ByteBuffer<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::nio::ByteBuffer>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::Future>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousByteChannel", java.flags == PUBLIC | ABSTRACT, .name == "write", .descriptor == "(Ljava/nio/ByteBuffer;)Ljava/util/concurrent/Future;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/nio/channels/AsynchronousByteChannel\0", "write\0", "(Ljava/nio/ByteBuffer;)Ljava/util/concurrent/Future;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}