If the InputStream that you are using supports mark, you can always use
mark and reset, although I'm not sure the advantages of that to just
re-opening the InputStream...

Jeff Wang
diCarta, Inc.

-----Original Message-----
From: Nick Burch [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 30, 2006 6:49 AM
To: POI Users List
Subject: [SPAM] - Re: InputStream and POIFSFileSystem... - Sender is
forged (SPF Fail)

On Thu, 30 Mar 2006, Sawant, Ramdas (IT) wrote:
> I have one question. Can I pass/use the same InputStream to 
> POIFSFileSystem. Because, when I passed the same InputStream to two 
> different functions I am getting the following error --

No, and nor can you do it with pretty much anything else that uses an 
input stream.

Just create one POIFSFileSystem, and make repeated calls to that.

If you really do need to give it to two different POIFSFileSystems, 
you'll have to read all the inputstream into a byte array, and create 
ByteArrayInputStreams from that. See your favourite Java book for
details 
and other options

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to