On 4/15/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote:

* Johan Compagner:

> how is this class (WebExternalResourceStream.java) different to:
> UrlResourceStream ??

* UrlResourceStream implements IResource for URLs, uses URL.openConnection
()
* WebExternalResourceStream implements IResource for a webapp URI,
  uses the servlet context



No if it is a file inside the web app. It will use it as a file.
If it isn't a file (inside the war or inside a jar or inside a war and a
jar) it will use the url.
And di remember that URS has special code so that we don't leak file
handles.
(work around a but in jre)


and how is WebExternalResourceRequestTarget different to
> ResourceStreamRequestTarget ?

The former could be dropped, except that currently
WebExternalResourceRequestTarget does not set Content-Length.  If
we use WebExternalResource + ResourceStreamRequestTarget it will
throw an exception because length() is not implemented.  I need to
address that, but that means I need to buffer the resource in a
ByteArrayOutputStream.


Which one should be dropped? The ResourceStreaMRequestTarget?
That will break all kinds of things. Then just adapt it the way you want.

johan

Reply via email to