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

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

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

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