xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r961065 - in /websites/staging/xmlgraphics/trunk/content: ./ fop/trunk/servlets.html
Date Fri, 07 Aug 2015 13:11:55 GMT
Author: buildbot
Date: Fri Aug  7 13:11:55 2015
New Revision: 961065

Log:
Staging update by buildbot for xmlgraphics

Modified:
    websites/staging/xmlgraphics/trunk/content/   (props changed)
    websites/staging/xmlgraphics/trunk/content/fop/trunk/servlets.html

Propchange: websites/staging/xmlgraphics/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Aug  7 13:11:55 2015
@@ -1 +1 @@
-1694626
+1694682

Modified: websites/staging/xmlgraphics/trunk/content/fop/trunk/servlets.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/trunk/servlets.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/trunk/servlets.html Fri Aug  7 13:11:55
2015
@@ -553,9 +553,20 @@ h2:hover > .headerlink, h3:hover > .head
 
 <span class="o">[..]</span>
 
+ <span class="n">ResourceResolver</span> <span class="n">resolver</span>
<span class="o">=</span> <span class="k">new</span> <span class="n">ResourceResolver</span><span
class="o">()</span> <span class="o">{</span>
+        <span class="kd">public</span> <span class="n">OutputStream</span>
<span class="nf">getOutputStream</span><span class="o">(</span><span
class="n">URI</span> <span class="n">uri</span><span class="o">)</span>
<span class="kd">throws</span> <span class="n">IOException</span>
<span class="o">{</span>
+            <span class="n">URL</span> <span class="n">url</span>
<span class="o">=</span> <span class="n">getServletContext</span><span
class="o">().</span><span class="na">getResource</span><span class="o">(</span><span
class="n">uri</span><span class="o">.</span><span class="na">toASCIIString</span><span
class="o">());</span>
+            <span class="k">return</span> <span class="n">url</span><span
class="o">.</span><span class="na">openConnection</span><span class="o">().</span><span
class="na">getOutputStream</span><span class="o">();</span>
+        <span class="o">}</span>
+
+        <span class="kd">public</span> <span class="n">Resource</span>
<span class="nf">getResource</span><span class="o">(</span><span
class="n">URI</span> <span class="n">uri</span><span class="o">)</span>
<span class="kd">throws</span> <span class="n">IOException</span>
<span class="o">{</span>
+            <span class="k">return</span> <span class="k">new</span>
<span class="nf">Resource</span><span class="o">(</span><span class="n">getServletContext</span><span
class="o">().</span><span class="na">getResourceAsStream</span><span
class="o">(</span><span class="n">uri</span><span class="o">.</span><span
class="na">toASCIIString</span><span class="o">()));</span>
+        <span class="o">}</span>
+    <span class="o">};</span>
+
 <span class="c1">//Setting up the FOP factory</span>
-<span class="k">this</span><span class="o">.</span><span class="na">fopFactory</span>
<span class="o">=</span> <span class="n">FopFactory</span><span
class="o">.</span><span class="na">newInstance</span><span class="o">(</span><span
class="k">new</span> <span class="n">File</span><span class="o">(</span><span
class="s">&quot;.&quot;</span><span class="o">).</span><span
class="na">toURI</span><span class="o">());</span>
-<span class="k">this</span><span class="o">.</span><span class="na">fopFactory</span><span
class="o">.</span><span class="na">setURIResolver</span><span class="o">(</span><span
class="k">this</span><span class="o">.</span><span class="na">uriResolver</span><span
class="o">);</span>
+<span class="n">FopFactoryBuilder</span> <span class="n">builder</span>
<span class="o">=</span> <span class="k">new</span> <span class="n">FopFactoryBuilder</span><span
class="o">(</span><span class="k">new</span> <span class="n">File</span><span
class="o">(</span><span class="s">&quot;.&quot;</span><span
class="o">).</span><span class="na">toURI</span><span class="o">(),</span>
<span class="n">resolver</span><span class="o">);</span>
+<span class="n">fopFactory</span> <span class="o">=</span> <span
class="n">builder</span><span class="o">.</span><span class="na">build</span><span
class="o">();</span>
 
 <span class="o">[..]</span>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message