Joscha Feth wrote: > that would allow for calling getRow without sending any headers and > still force validity if the user decides to use send() without calling
I see the problem now :) - chunks added to the queue are streamed to the client on each getRow() call, there is no real buffer - thats why it is needed to send the client in advance to any additional call to getRow(). What about an additional function hasRows() instead - that should do the trick to at least find out if there are rows at all, which should help in 90% of all the cases. Another option would be an additional flush() method which would allow flushing the chunk buffer on the user's choice - that would also be consistent with how output streams are handled in other applications/languages. I think a combination of both would be best - defaulting to flush() on every call to getRow() for inexperienced users, with a flag to disable immediate flushing and let the experienced users decide when they want to flush. Together with an hasRows() method which does not send any headers this should be a good solution for everyone. Thoughts? regards, Joscha --
