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

        /// [isRepeatable](https://developer.android.com/reference/org/apache/http/HttpEntity.html#isRepeatable())
        pub fn isRepeatable<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "org/apache/http/HttpEntity", java.flags == PUBLIC | ABSTRACT, .name == "isRepeatable", .descriptor == "()Z"
            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("org/apache/http/HttpEntity\0", "isRepeatable\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isChunked](https://developer.android.com/reference/org/apache/http/HttpEntity.html#isChunked())
        pub fn isChunked<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "org/apache/http/HttpEntity", java.flags == PUBLIC | ABSTRACT, .name == "isChunked", .descriptor == "()Z"
            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("org/apache/http/HttpEntity\0", "isChunked\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getContentLength](https://developer.android.com/reference/org/apache/http/HttpEntity.html#getContentLength())
        pub fn getContentLength<'env>(&'env self) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "org/apache/http/HttpEntity", java.flags == PUBLIC | ABSTRACT, .name == "getContentLength", .descriptor == "()J"
            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("org/apache/http/HttpEntity\0", "getContentLength\0", "()J\0");
                __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

        /// [getContent](https://developer.android.com/reference/org/apache/http/HttpEntity.html#getContent())
        ///
        /// Required features: "java-io-InputStream"
        #[cfg(any(feature = "all", all(feature = "java-io-InputStream")))]
        pub fn getContent<'env>(&'env self) -> __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 == "org/apache/http/HttpEntity", java.flags == PUBLIC | ABSTRACT, .name == "getContent", .descriptor == "()Ljava/io/InputStream;"
            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("org/apache/http/HttpEntity\0", "getContent\0", "()Ljava/io/InputStream;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

        /// [isStreaming](https://developer.android.com/reference/org/apache/http/HttpEntity.html#isStreaming())
        pub fn isStreaming<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "org/apache/http/HttpEntity", java.flags == PUBLIC | ABSTRACT, .name == "isStreaming", .descriptor == "()Z"
            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("org/apache/http/HttpEntity\0", "isStreaming\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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