cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianugo Rabellino <>
Subject Flow's processPipelineTo() and FileSource
Date Thu, 31 Jul 2003 14:35:16 GMT
I'm having a hell of a time using flow with processPipelineTo() and 
OutputStreams coming out from FileSource(s).

The problem is that FileSource#getOutputStream() creates a temporary 
file (... to be discussed later ...) and such file gets renamed to the 
original one only upon OutputStream.close(). Now, AbstractInterpreter, 
line 201, actually calls flush() but *never* close. As a result, 
everything is kinda ... well... screwed up.

Patch is trivial, but I'm wondering if adding out.close() in might break something: any flow experts around?

Now for the FileSource: I do understand *some* of the reasoning behind 
using a temporary file, but I have to disagree on the implementation: 
naming it [filename].tmp is a bit of a bet, since someone might 
legitimately have such a filename around. While I understand that there 
might be memory issues with large files, I guess that either:

1. keeping a ByteArrayOutputStream;
2. forget about it and just write the file;
3. use a more "clever" name that doesn't risk conflicts this much

are all better options.

Is that OK to you if I work on it? I don't know if I have access to the 
Excalibur CVS though...


Gianugo Rabellino
Pro-netics s.r.l. -
Orixo, the XML business alliance -
     (Now blogging at:

View raw message