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 = "android-util-AtomicFile"))]
__jni_bindgen! {
    /// public class [AtomicFile](https://developer.android.com/reference/android/util/AtomicFile.html)
    ///
    /// Required feature: "android-util-AtomicFile"
    public class AtomicFile ("android/util/AtomicFile") extends crate::java::lang::Object {

        /// [AtomicFile](https://developer.android.com/reference/android/util/AtomicFile.html#AtomicFile(java.io.File))
        ///
        /// Required features: "java-io-File"
        #[cfg(any(feature = "all", all(feature = "java-io-File")))]
        pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::io::File>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::util::AtomicFile>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/util/AtomicFile", java.flags == PUBLIC, .name == "<init>", .descriptor == "(Ljava/io/File;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/AtomicFile\0", "<init>\0", "(Ljava/io/File;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getBaseFile](https://developer.android.com/reference/android/util/AtomicFile.html#getBaseFile())
        ///
        /// Required features: "java-io-File"
        #[cfg(any(feature = "all", all(feature = "java-io-File")))]
        pub fn getBaseFile<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::io::File>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/util/AtomicFile", java.flags == PUBLIC, .name == "getBaseFile", .descriptor == "()Ljava/io/File;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/AtomicFile\0", "getBaseFile\0", "()Ljava/io/File;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [delete](https://developer.android.com/reference/android/util/AtomicFile.html#delete())
        pub fn delete<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/util/AtomicFile", java.flags == PUBLIC, .name == "delete", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/AtomicFile\0", "delete\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [startWrite](https://developer.android.com/reference/android/util/AtomicFile.html#startWrite())
        ///
        /// Required features: "java-io-FileOutputStream"
        #[cfg(any(feature = "all", all(feature = "java-io-FileOutputStream")))]
        pub fn startWrite<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::io::FileOutputStream>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/util/AtomicFile", java.flags == PUBLIC, .name == "startWrite", .descriptor == "()Ljava/io/FileOutputStream;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/AtomicFile\0", "startWrite\0", "()Ljava/io/FileOutputStream;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [finishWrite](https://developer.android.com/reference/android/util/AtomicFile.html#finishWrite(java.io.FileOutputStream))
        ///
        /// Required features: "java-io-FileOutputStream"
        #[cfg(any(feature = "all", all(feature = "java-io-FileOutputStream")))]
        pub fn finishWrite<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::io::FileOutputStream>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/util/AtomicFile", java.flags == PUBLIC, .name == "finishWrite", .descriptor == "(Ljava/io/FileOutputStream;)V"
            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("android/util/AtomicFile\0", "finishWrite\0", "(Ljava/io/FileOutputStream;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [failWrite](https://developer.android.com/reference/android/util/AtomicFile.html#failWrite(java.io.FileOutputStream))
        ///
        /// Required features: "java-io-FileOutputStream"
        #[cfg(any(feature = "all", all(feature = "java-io-FileOutputStream")))]
        pub fn failWrite<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::io::FileOutputStream>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/util/AtomicFile", java.flags == PUBLIC, .name == "failWrite", .descriptor == "(Ljava/io/FileOutputStream;)V"
            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("android/util/AtomicFile\0", "failWrite\0", "(Ljava/io/FileOutputStream;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [openRead](https://developer.android.com/reference/android/util/AtomicFile.html#openRead())
        ///
        /// Required features: "java-io-FileInputStream"
        #[cfg(any(feature = "all", all(feature = "java-io-FileInputStream")))]
        pub fn openRead<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::io::FileInputStream>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/util/AtomicFile", java.flags == PUBLIC, .name == "openRead", .descriptor == "()Ljava/io/FileInputStream;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/AtomicFile\0", "openRead\0", "()Ljava/io/FileInputStream;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [readFully](https://developer.android.com/reference/android/util/AtomicFile.html#readFully())
        pub fn readFully<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, __jni_bindgen::ByteArray>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/util/AtomicFile", java.flags == PUBLIC, .name == "readFully", .descriptor == "()[B"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/AtomicFile\0", "readFully\0", "()[B\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}