Author: buildbot
Date: Wed Oct 14 16:19:39 2015
New Revision: 968910

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/base64.html
    websites/production/camel/content/cache/main.pageCache

Modified: websites/production/camel/content/base64.html
==============================================================================
--- websites/production/camel/content/base64.html (original)
+++ websites/production/camel/content/base64.html Wed Oct 14 16:19:39 2015
@@ -85,12 +85,39 @@
        <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="Base64-Base64DataFormat">Base64 
Data Format</h2><p><strong>Available as of Camel 2.11</strong><br clear="none"> 
The Base64 <a shape="rect" href="data-format.html">Data Format</a> is a data 
format for <a shape="rect" class="external-link" 
href="http://en.wikipedia.org/wiki/Base64"; rel="nofollow">base64 encoding and 
decoding</a>.</p><h3 id="Base64-Options">Options</h3><div 
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" 
rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p>lineLength</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>76</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>To specific a maximum line length for the encoded 
data.</p></td></tr><tr><td colspan="1" rowspan="1" class="conflu
 enceTd"><p>lineSeparator</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>\r\n</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The line separators to use.</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p>urlSafe</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Instead of emitting '+' and '/' we emit '-' 
and '_' respectively. urlSafe is only applied to encode operations. Decoding 
seamlessly handles both modes.</p></td></tr></tbody></table></div><h3 
id="Base64-Marshal">Marshal</h3><p>In this example we marshal the file content 
to base64 object.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<div class="wiki-content maincontent"><h2 id="Base64-Base64DataFormat">Base64 
Data Format</h2><p><strong>Available as of Camel 2.11</strong><br clear="none"> 
The Base64 <a shape="rect" href="data-format.html">Data Format</a> is a data 
format for <a shape="rect" class="external-link" 
href="http://en.wikipedia.org/wiki/Base64"; rel="nofollow">base64 encoding and 
decoding</a>.</p><h3 id="Base64-Options">Options</h3><div 
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" 
rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p>lineLength</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>76</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>To specific a maximum line length for the encoded 
data.</p></td></tr><tr><td colspan="1" rowspan="1" class="conflu
 enceTd"><p>lineSeparator</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>\r\n</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The line separators to use.</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p>urlSafe</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Instead of emitting '+' and '/' we emit '-' 
and '_' respectively. urlSafe is only applied to encode operations. Decoding 
seamlessly handles both modes.</p></td></tr></tbody></table></div><p>In Spring 
DSL, you configure the data format using this tag:</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;camelContext&gt;
+    &lt;dataFormats&gt;
+        &lt;!-- for a newline character (\n), use the HTML entity notation 
coupled with the ASCII code. --&gt;
+        &lt;base64 lineSeparator=&quot;&amp;#10;&quot; 
id=&quot;base64withNewLine&quot; /&gt;
+        &lt;base64 lineLength=&quot;64&quot; 
id=&quot;base64withLineLength64&quot; /&gt;
+    &lt;/dataFormats&gt;
+    ...
+&lt;/camelContext&gt;]]></script>
+</div></div><p>Then you can use it later by its reference:</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;route&gt;
+     &lt;from uri=&quot;direct:startEncode&quot; /&gt;
+     &lt;marshal ref=&quot;base64withLineLength64&quot; /&gt;
+     &lt;to uri=&quot;mock:result&quot; /&gt;
+&lt;/route&gt;]]></script>
+</div></div><div class="confluence-information-macro 
confluence-information-macro-information"><span class="aui-icon aui-icon-small 
aui-iconfont-info confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body">Most of the time, you won't need to 
declare the data format if you use the default options. In that case, you can 
declare the data format inline as shown below.</div></div><h3 
id="Base64-Marshal">Marshal</h3><p>In this example we marshal the file content 
to base64 object.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;file://data.bin&quot;).marshal().base64().to(&quot;jms://myqueue&quot;);
 ]]></script>
+</div></div><p>In Spring DSL:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[ &lt;from uri=&quot;file://data.bin&quot;&gt;
+ &lt;marshal&gt;
+     &lt;base64/&gt;
+ &lt;/marshal&gt;
+ &lt;to uri=&quot;jms://myqueue&quot;/&gt; ]]></script>
 </div></div><h3 id="Base64-Unmarshal">Unmarshal</h3><p>In this example we 
unmarshal the payload from the JMS queue to a byte[] object, before its 
processed by the newOrder processor.</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;jms://queue/order&quot;).unmarshal().base64().processRef(&quot;newOrder&quot;);
 ]]></script>
+</div></div><p>In Spring DSL:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[ &lt;from 
uri=&quot;jms://queue/order&quot;&gt;
+ &lt;marshal&gt;
+     &lt;base64/&gt;
+ &lt;/marshal&gt;
+ &lt;to uri=&quot;bean:newOrder&quot;/&gt; ]]></script>
 </div></div><h3 id="Base64-Dependencies">Dependencies</h3><p>To use Base64 in 
your Camel routes you need to add a dependency on <strong>camel-base64</strong> 
which implements this data format.</p><p>If you use Maven you can just add the 
following to your pom.xml:</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.


Reply via email to