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

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

        /// [replacement](https://developer.android.com/reference/java/nio/charset/CharsetEncoder.html#replacement())
        pub fn replacement<'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 == "java/nio/charset/CharsetEncoder", java.flags == PUBLIC | FINAL, .name == "replacement", .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("java/nio/charset/CharsetEncoder\0", "replacement\0", "()[B\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

        /// [isLegalReplacement](https://developer.android.com/reference/java/nio/charset/CharsetEncoder.html#isLegalReplacement(byte%5B%5D))
        pub fn isLegalReplacement<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ByteArray>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/charset/CharsetEncoder", java.flags == PUBLIC, .name == "isLegalReplacement", .descriptor == "([B)Z"
            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/charset/CharsetEncoder\0", "isLegalReplacement\0", "([B)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

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

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

        /// [averageBytesPerChar](https://developer.android.com/reference/java/nio/charset/CharsetEncoder.html#averageBytesPerChar())
        pub fn averageBytesPerChar<'env>(&'env self) -> __jni_bindgen::std::result::Result<f32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/charset/CharsetEncoder", java.flags == PUBLIC | FINAL, .name == "averageBytesPerChar", .descriptor == "()F"
            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/nio/charset/CharsetEncoder\0", "averageBytesPerChar\0", "()F\0");
                __jni_env.call_float_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [maxBytesPerChar](https://developer.android.com/reference/java/nio/charset/CharsetEncoder.html#maxBytesPerChar())
        pub fn maxBytesPerChar<'env>(&'env self) -> __jni_bindgen::std::result::Result<f32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/charset/CharsetEncoder", java.flags == PUBLIC | FINAL, .name == "maxBytesPerChar", .descriptor == "()F"
            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/nio/charset/CharsetEncoder\0", "maxBytesPerChar\0", "()F\0");
                __jni_env.call_float_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

        /// [flush](https://developer.android.com/reference/java/nio/charset/CharsetEncoder.html#flush(java.nio.ByteBuffer))
        ///
        /// Required features: "java-nio-ByteBuffer", "java-nio-charset-CoderResult"
        #[cfg(any(feature = "all", all(feature = "java-nio-ByteBuffer", feature = "java-nio-charset-CoderResult")))]
        pub fn flush<'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::nio::charset::CoderResult>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/charset/CharsetEncoder", java.flags == PUBLIC | FINAL, .name == "flush", .descriptor == "(Ljava/nio/ByteBuffer;)Ljava/nio/charset/CoderResult;"
            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/charset/CharsetEncoder\0", "flush\0", "(Ljava/nio/ByteBuffer;)Ljava/nio/charset/CoderResult;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

        /// [canEncode](https://developer.android.com/reference/java/nio/charset/CharsetEncoder.html#canEncode(char))
        pub fn canEncode_char<'env>(&'env self, arg0: __jni_bindgen::jchar) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/charset/CharsetEncoder", java.flags == PUBLIC, .name == "canEncode", .descriptor == "(C)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/nio/charset/CharsetEncoder\0", "canEncode\0", "(C)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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