Prashant Jain wrote:
> 
............... snip
> Once the stream has been read the first time by calling foo(), trying to
> re-read by callin foo() again fails since the call fis.read()
> returns -1. What is needed is some way of resetting the stream. There is
> a pair of methods called mark/reset available in all Java streams but
> unfortunately they are not supported for any of the streams that I
> experimented with (including ServletInputStream).
> 
> So this may seem more like a basic Java question -- how can an
> InputStream be reset so that its contents can be read again?
> 
> Thanks,
> 
> - Prashant

 java.io.BufferedInputStream supports mark / reset as
long as the buffer still contains the marked point.

-- 
WBB - [EMAIL PROTECTED]
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP 
ISBN 0-7821-2809-2

Reply via email to