cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bart Molenkamp" <b.molenk...@bizzdesign.nl>
Subject Write binary data to output stream from flow
Date Thu, 17 Feb 2005 16:12:37 GMT
Hi,

Is it possible to write binary data to the HTTP response directly from
the flow? I have an InputStream available in my flow, and I want to
serve data from that stream directly to the HTTP response. E.g.

cocoon.sendBinaryData(inputStream, "application/octet-stream");

Or something similar.

I solved it now by creating a SourceFactory and Source implementation,
so that I can use a plain reader, but this feels a bit like overkill.
The SourceFactory has to lookup the data from the database (that is
where the data is for the input stream), and the URL contains the
primary key to get the data from the database.

Anyone any idea?

Bart.

Mime
View raw message