Hi, If you know up-front the number of bytes you need to analyze the message, you can consider wrapping the InputStream returned by OpenJPA in a java.io.BufferedInputStream or PushbackInputStream and then using the methods Mike has mentioned.
Greetings, Milosz > What about using InputStream.mark() and .reset()? > > The unit test for OpenJPA's streaming lob support uses a > ByteArrayInputStream and a quick sniff test with mark and reset worked for > me. > > -mike > > On Thu, Nov 18, 2010 at 1:20 PM, Norman Maurer <[email protected]> wrote: > > > > > We use openjpa for an imap mail store in JAMES. Sometimes we need to read > > the > > InputStream a few times and would like to save the cost of query again > > every > > time. > > > > For example we read the stream for analyze the message and then again for > > write it back the the imap client. > > > > Bye, > > Norman > > -- > > View this message in context: > > http://openjpa.208410.n2.nabble.com/Possible-to-re-read-InputStream-when-using-LOB-Streaming-tp5752905p5752968.html > > Sent from the OpenJPA Users mailing list archive at Nabble.com. > > >
