How do you retain a whole InputStream after you buffer it?
For instance, I need to get an InputStream, then pass it along to a method. I need to re-reference that passed stream again (and again).
I've got the following:
InputStream is = t.getTemplate(); // t is an object that returns an InputStream, successfully BufferedInputStream bais = new BufferedInputStream(is); useMyStream(bais); // here I need to re-use the return value from t.getTemplate() // but when I call bais.available() it gives me 0 or says Stream is closed!
How do I reuse it after calling out to another local public method? Thanks, Paul