<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<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>https://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>
	<lastBuildDate>Thu, 11 Sep 2014 09:58:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/comment-page-1/#comment-207415</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Tue, 09 Mar 2010 18:36:52 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=165#comment-207415</guid>
		<description>Geoff,

You are exactly right.  I went and dug the code out of Subversion where I was using this technique and the code closes the outputStream not output.  This is perhaps a CF7 -&gt; CF8 difference, judging by the post date.  I&#039;ve corrected the code in the post as well.</description>
		<content:encoded><![CDATA[<p>Geoff,</p>
<p>You are exactly right.  I went and dug the code out of Subversion where I was using this technique and the code closes the outputStream not output.  This is perhaps a CF7 -&gt; CF8 difference, judging by the post date.  I've corrected the code in the post as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff</title>
		<link>https://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/comment-page-1/#comment-207390</link>
		<dc:creator>Geoff</dc:creator>
		<pubDate>Tue, 09 Mar 2010 10:57:58 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=165#comment-207390</guid>
		<description>Many thanks Barney. I&#039;ve flattened my JARs as you suggest. Works fine, but I&#039;ve still got my &#039;close&#039; problem.

Might it be &#039;outputStream.close();&#039; instead of &#039;output.close();&#039; in your example above?</description>
		<content:encoded><![CDATA[<p>Many thanks Barney. I've flattened my JARs as you suggest. Works fine, but I've still got my 'close' problem.</p>
<p>Might it be 'outputStream.close();' instead of 'output.close();' in your example above?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/comment-page-1/#comment-207332</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Mon, 08 Mar 2010 17:51:15 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=165#comment-207332</guid>
		<description>Geoff,

You&#039;ll want put all the JARs directly in /WEB-INF/lib, without the extra intermediate &#039;lib&#039; folder.  Batik (along with a lot of other projects) packages it that way so it&#039;s obvious which JARs are the core project and which are the project&#039;s dependencies.  But the JVM only loads from /WEB-INF/lib, not child folders, so if you want to use the bundled dependencies, you have to flatten it out.</description>
		<content:encoded><![CDATA[<p>Geoff,</p>
<p>You'll want put all the JARs directly in /WEB-INF/lib, without the extra intermediate 'lib' folder.  Batik (along with a lot of other projects) packages it that way so it's obvious which JARs are the core project and which are the project's dependencies.  But the JVM only loads from /WEB-INF/lib, not child folders, so if you want to use the bundled dependencies, you have to flatten it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff</title>
		<link>https://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/comment-page-1/#comment-207303</link>
		<dc:creator>Geoff</dc:creator>
		<pubDate>Mon, 08 Mar 2010 09:28:15 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=165#comment-207303</guid>
		<description>I&#039;ve tried it on both CF7 &amp; 8 - same issue occurs on both.

I guess it might be the way I installed it... I removed the batik jars from web-inf/cfform and dropped the new .jars in web-inf/lib and restarted...

I wasn&#039;t sure whether to keep batik&#039;s file structure though - I have:

web-inf/lib/batik.jar + others
web-inf/lib/lib/batik-anim.jar + more

or just move all the .jars into the one web-inf/lib folder...</description>
		<content:encoded><![CDATA[<p>I've tried it on both CF7 &amp; 8 &#8211; same issue occurs on both.</p>
<p>I guess it might be the way I installed it&#8230; I removed the batik jars from web-inf/cfform and dropped the new .jars in web-inf/lib and restarted&#8230;</p>
<p>I wasn't sure whether to keep batik's file structure though &#8211; I have:</p>
<p>web-inf/lib/batik.jar + others<br />
web-inf/lib/lib/batik-anim.jar + more</p>
<p>or just move all the .jars into the one web-inf/lib folder&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/comment-page-1/#comment-207085</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Fri, 05 Mar 2010 17:36:28 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=165#comment-207085</guid>
		<description>Geoff,

What version of ColdFusion are you using?  I haven&#039;t tested this on CF9, or later CF8 builds, so if you&#039;re using one of those it&#039;s quite possible Adobe changed something that renders this technique unusable, at least exactly as I&#039;ve used it.  &#039;output&#039; is a Batik instance, and CF uses Batik for some of its form processing stuff, so if they&#039;ve updated the bundled version that might be it.</description>
		<content:encoded><![CDATA[<p>Geoff,</p>
<p>What version of ColdFusion are you using?  I haven't tested this on CF9, or later CF8 builds, so if you're using one of those it's quite possible Adobe changed something that renders this technique unusable, at least exactly as I've used it.  'output' is a Batik instance, and CF uses Batik for some of its form processing stuff, so if they've updated the bundled version that might be it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff</title>
		<link>https://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/comment-page-1/#comment-207081</link>
		<dc:creator>Geoff</dc:creator>
		<pubDate>Fri, 05 Mar 2010 16:47:05 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=165#comment-207081</guid>
		<description>Just gave this a spin - works great! Many thanks.
One small problem though - output.close() seems to chuck an error:

The close method was not found.Either there are no methods with the specified method name and argument types, or the close method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that matched the provided arguments. If this is a Java object and you verified that the method exists, you may need to use the javacast function to reduce ambiguity</description>
		<content:encoded><![CDATA[<p>Just gave this a spin &#8211; works great! Many thanks.<br />
One small problem though &#8211; output.close() seems to chuck an error:</p>
<p>The close method was not found.Either there are no methods with the specified method name and argument types, or the close method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that matched the provided arguments. If this is a Java object and you verified that the method exists, you may need to use the javacast function to reduce ambiguity</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Collins</title>
		<link>https://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/comment-page-1/#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&#039;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>https://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/comment-page-1/#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&#039;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&#039;m not actually writing to the OutputStream (as Christian&#039;s example showed), I&#039;m just wrapping it up and letting the PNGTranscoder write to it for me.  I could have used a ByteArrayOutputStream for the PNGTranscoder&#039;s destination, and then extracted the byte array and passed it to the response&#039;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>https://www.barneyb.com/barneyblog/2006/05/04/more-batik-goodness/comment-page-1/#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&#039;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>
