cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JeVeoy <>
Subject Re: Streaming buffered image using Cocoon
Date Sat, 21 May 2011 12:00:43 GMT

Thomas Markus wrote:
> hi,
> create a reader and stream your image. see AbstractReader.out and beware 
> of org.apache.cocoon.util.BufferedOutputStream.realFlush()
> regards
> Thomas
>> You can use
>> javax.imageio.ImageIO.write(RenderedImage, String, OutputStream)
>> to write directly into an OutputStream.
>> You just need to get the OutputStream from the original HTTP request.
>> HTH,
>> Steven
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

First of all: thank you so much for helping me out, Steven & Thomas!

Then: I've tried my best to see if I could get a working example to run
using either javax.imageio.ImageIO.write(RenderedImage, String,
OutputStream) or AbstractReader.out, but to no luck. Googling didn't quite
help either. I'm very sorry for my lack of knowledge... Hope you can forgive

Pipeline for an image-reader is, as far as I know, defined in sitemap.xmap
like this:

<map:match pattern="*.jpg">
  <map:read type="image" src="path/{1}.png" mime-type="image/png">

How can I make use of AbstractReader.out in this definition?
View this message in context:
Sent from the Cocoon - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message