Re: RereadableInputStream

2007-10-15 Thread Jukka Zitting
Hi, On 10/14/07, Niall Pemberton <[EMAIL PROTECTED]> wrote: > I don't see anything in the javadocs for the mark/reset methods in > InputStream that prevent it from being used for streams of arbitrary > length. > [...] > Secondly, from a Commons IO perspective, we already have some of the > functio

Re: RereadableInputStream

2007-10-15 Thread Jeremias Maerki
On 14.10.2007 04:35:27 Niall Pemberton wrote: > On 10/11/07, Keith R. Bennett <[EMAIL PROTECTED]> wrote: > > > > Hello, all. I am working with the Apache Tika project. We found the need > > to > > get a newly opened input stream from the user, and possibly read it multiple > > times. I am awa

Re: RereadableInputStream

2007-10-13 Thread Niall Pemberton
modifications or a > totally different approach that would fulfill the need more wisely, please > let me know. I have a couple of comments. Firstly although the InputStream byte array read methods delegate to the single byte read method - not all implementations do (FileInputStream doesn'

RereadableInputStream

2007-10-11 Thread Keith R. Bennett
ulfill the need more wisely, please let me know. It's called RereadableInputStream. It saves the bytes read from the original stream in a byte [], until a user-specified threshold is reached, then it moves the buffer to a temporary file. I'm attaching the file and a basic unit test class