pub fn from_env_with_capacity(
        capacity: usize,
        env: &'b JNIEnv<'a>,
        obj: JObject<'a>,
    ) -> Result<JInputStream<'a, 'b>> {
        let class = env.auto_local(env.find_class("java/io/InputStream")?);

        let read = env.get_method_id(&class, "read", "([B)I")?;

        let buffer = env.auto_local(env.new_byte_array(capacity as jsize)?);

        Ok(JInputStream {
            internal: obj,
            buffer,
            read,
            env,
        })
    }
/// Wrap an environment and an object that implements
/// `java.io.InputStream`, specifying the capacity of the internal
/// buffer.
Wrap an environment and an object that implements
`java.io.InputStream`, specifying the capacity of the internal
buffer.
Wrap an environment and an object that implements ` java . io . InputStream ` specifying the capacity of the internal buffer .
pub fn from_env_with_capacity(
        capacity: usize,
        env: &'b JNIEnv<'a>,
        obj: JObject<'a>,
    ) -> Result<JInputStream<'a, 'b>> {
        let class = env.auto_local(env.find_class("java/io/InputStream")?);
        let read = env.get_method_id(&class, "read", "([B)I")?;
        let buffer = env.auto_local(env.new_byte_array(capacity as jsize)?);
        Ok(JInputStream {
            internal: obj,
            buffer,
            read,
            env,
        })
    }
pub fn from_env_with_capacity ( capacity : usize , env : & ' b JNIEnv < ' a > , obj : JObject < ' a > , ) -> Result < JInputStream < ' a , ' b > > { let class = env . auto_local ( env . find_class ( " " ) ? ) ; let read = env . get_method_id ( & class , " " , " " ) ? ; let buffer = env . auto_local ( env . new_byte_array ( capacity as jsize ) ? ) ; Ok ( JInputStream { internal : obj , buffer , read , env , } ) }
Wrap an environment and an object that implements
`java.io.InputStream`, specifying the capacity of the internal
buffer.
Wrap an environment and an object that implements ` java . io . InputStream ` specifying the capacity of the internal buffer .
capacity
usize
env
&'b JNIEnv<'a>
obj
JObject<'a>