Vadim Gritsenko wrote:

Sylvain Wallez wrote:

But we have to define the behavior of getInputStream for environments where it has no meaning (e.g. background env,

It can be initialized with java.io.InputStream (File, byte array), or null. If null, throw exception.


sitemap source, cocoonbean

I believe you mean CLI environment. CocoonBean does not (should not) depend on environment (hopefully). For CLI, InputStream can be initialized with either FileInputStream, or System.in, or null. If null, throw exception.

FileInputStream or System.in could possibly usefull for testing (or even using), Webservices written in Cocoon from the command line. And for using Cocoon as a command line XML filter.


etc).

MailEnvironment - has input stream. HttpEnvironment - has input stream as well. PortletEnvironment - action request has input stream.

IMO, we should throw an exception for these cases.

Agreed.

Vadim

And +1 for adding getInputStream to the Request interface.

/Daniel




Reply via email to