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

        /// [ZipFile](https://developer.android.com/reference/java/util/zip/ZipFile.html#ZipFile(java.io.File))
        ///
        /// Required features: "java-io-File"
        #[cfg(any(feature = "all", all(feature = "java-io-File")))]
        pub fn new_File<'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::java::util::zip::ZipFile>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/zip/ZipFile", 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("java/util/zip/ZipFile\0", "<init>\0", "(Ljava/io/File;)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

        /// [close](https://developer.android.com/reference/java/util/zip/ZipFile.html#close())
        pub fn close<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/zip/ZipFile", java.flags == PUBLIC, .name == "close", .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("java/util/zip/ZipFile\0", "close\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

        /// [size](https://developer.android.com/reference/java/util/zip/ZipFile.html#size())
        pub fn size<'env>(&'env self) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/util/zip/ZipFile", java.flags == PUBLIC, .name == "size", .descriptor == "()I"
            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("java/util/zip/ZipFile\0", "size\0", "()I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// public static final [OPEN_READ](https://developer.android.com/reference/java/util/zip/ZipFile.html#OPEN_READ)
        pub const OPEN_READ : i32 = 1;

        /// public static final [OPEN_DELETE](https://developer.android.com/reference/java/util/zip/ZipFile.html#OPEN_DELETE)
        pub const OPEN_DELETE : i32 = 4;
    }
}