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[<camelContext>
+ <dataFormats>
+ <!-- for a newline character (\n), use the HTML entity notation
coupled with the ASCII code. -->
+ <base64 lineSeparator="&#10;"
id="base64withNewLine" />
+ <base64 lineLength="64"
id="base64withLineLength64" />
+ </dataFormats>
+ ...
+</camelContext>]]></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[<route>
+ <from uri="direct:startEncode" />
+ <marshal ref="base64withLineLength64" />
+ <to uri="mock:result" />
+</route>]]></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("file://data.bin").marshal().base64().to("jms://myqueue");
]]></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[ <from uri="file://data.bin">
+ <marshal>
+ <base64/>
+ </marshal>
+ <to uri="jms://myqueue"/> ]]></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("jms://queue/order").unmarshal().base64().processRef("newOrder");
]]></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[ <from
uri="jms://queue/order">
+ <marshal>
+ <base64/>
+ </marshal>
+ <to uri="bean:newOrder"/> ]]></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[<dependency>
<groupId>org.apache.camel</groupId>
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.