* Johan Compagner:
>
> Which one should be dropped? The ResourceStreaMRequestTarget?
> That will break all kinds of things. Then just adapt it the way you want.
Don't take "drop" literally, I mean make
WebExternalResourceRequestTarget reuse the
WebExternalResourceStream. I could change the implementation
indeed to implement buffering. But in the end, we'll end up with
many classes implementing buffering just for satisfying length().
So we could just allow to return -1, and the framework will take
care of the buffering. Actually, that's what is done in Cocoon,
when a resource stream does not provide the length, it overrides
shouldSetContentLength() returning true so that the underlying
pipeline buffers the output to compute the length.
I'm a bit reluctant to use ByteArrayOutputStream everywhere, you
see?
--
Jean-Baptiste Quenot
aka John Banana Qwerty
http://caraldi.com/jbq/