"Doron Cohen" <[EMAIL PROTECTED]> wrote: > > Agreed, so we can't change the API. So the next/nextDirect proposal > > should work well: it doesn't change the API yet would allow consumers > > that don't require "full private copy" of every Token, like > > DocumentsWriter, to have good performance. > > If we eventually go this way, my preferred API for reuse is > next(Token resToken) > where a non-null resToken reads as > "if supported, please use this object for the returned result"
OK, I'm taking this approach right now in the benchmarks I just tested. I added this method: boolean next(Token resToken) which returns true if it has updated resToken with another token, else false if end-of-stream was hit. Mike --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]