cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oscar Picasso <oscgoo...@yahoo.com>
Subject Re: Serving arbitrary OutputStreams with Cocoon
Date Tue, 13 Apr 2004 17:51:57 GMT
--- Geoff Howard <cocoon@leverageweb.com> wrote:
[..}
> 
> Implement a custom Reader, similar to ResourceReader and the other Readers
> such 
> ImageReader, DatabaseReader in the database block, etc.
> 
> Geoff

and

--- Ugo Cei <u.cei@cbim.it> wrote:
[...]
> The cleanest way would be to wrap your components with a class that 
> implement the Source interface and use it directly from the ResourceReader:
> 
>    <map:read src="myscheme:whatever"/>
> 
> You can find a detailed example in Langham & Ziegeler's book "Cocoon: 
> Building XML Applications" (New Riders).
> 
> Alternatively, you can copy&paste ResourceReader and change 
> "inputSource.getInputStream" to "myComponent.getInputStream" etc.
> 
> 	Ugo

Thank you both for your input. I would ask for another advice if I may.

In both cases it seems that I have to provide some input stream to my Reader or
my Source component. However the Postscript and PDF are actually sent to an
OutputStream.

I guess the above approaches mean I need to use Piped streams to 'transform' my
OuputStream to an InputSream. Or have you a better suggestion?

Oscar


	
		
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message