<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: More Batik Goodness</title>
	<atom:link href="http://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/</link>
	<description>Thoughts, rants, and even some code from the mind of Barney Boisvert.</description>
	<pubDate>Fri, 21 Nov 2008 16:18:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Jim Collins</title>
		<link>http://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/#comment-353</link>
		<dc:creator>Jim Collins</dc:creator>
		<pubDate>Fri, 05 May 2006 13:17:10 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=165#comment-353</guid>
		<description>I'm doing something similar with SAX but your solution is much more elegant that the kludge I hacked together :)
</description>
		<content:encoded><![CDATA[<p>I'm doing something similar with SAX but your solution is much more elegant that the kludge I hacked together :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barney</title>
		<link>http://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/#comment-352</link>
		<dc:creator>Barney</dc:creator>
		<pubDate>Fri, 05 May 2006 13:09:25 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=165#comment-352</guid>
		<description>Jim,

Absolutely.  With a file you just use CFCONTENT, but if your data is anywhere else (memory, database) you can use the response's OutputStream to write it directly.  You could even use it to send back a string of HTML if you wanted, but CF provides much nicer ways for doing that (like CFOUTPUT).

Note that in my example, I'm not actually writing to the OutputStream (as Christian's example showed), I'm just wrapping it up and letting the PNGTranscoder write to it for me.  I could have used a ByteArrayOutputStream for the PNGTranscoder's destination, and then extracted the byte array and passed it to the response's OutputStream to achieve the same effect, but doing it as I did saves an extra buffering.</description>
		<content:encoded><![CDATA[<p>Jim,</p>
<p>Absolutely.  With a file you just use CFCONTENT, but if your data is anywhere else (memory, database) you can use the response's OutputStream to write it directly.  You could even use it to send back a string of HTML if you wanted, but CF provides much nicer ways for doing that (like CFOUTPUT).</p>
<p>Note that in my example, I'm not actually writing to the OutputStream (as Christian's example showed), I'm just wrapping it up and letting the PNGTranscoder write to it for me.  I could have used a ByteArrayOutputStream for the PNGTranscoder's destination, and then extracted the byte array and passed it to the response's OutputStream to achieve the same effect, but doing it as I did saves an extra buffering.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Collins</title>
		<link>http://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/#comment-351</link>
		<dc:creator>Jim Collins</dc:creator>
		<pubDate>Fri, 05 May 2006 13:04:58 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=165#comment-351</guid>
		<description>Nice work Barney. I'm assuming that that output method could be used to send anything to the browser not just a PNG image?</description>
		<content:encoded><![CDATA[<p>Nice work Barney. I'm assuming that that output method could be used to send anything to the browser not just a PNG image?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
