camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r907967 - in /websites/production/camel/content: cache/main.pageCache zip-file-dataformat.html
Date Sun, 04 May 2014 02:17:48 GMT
Author: buildbot
Date: Sun May  4 02:17:48 2014
New Revision: 907967

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/zip-file-dataformat.html

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

Modified: websites/production/camel/content/zip-file-dataformat.html
==============================================================================
--- websites/production/camel/content/zip-file-dataformat.html (original)
+++ websites/production/camel/content/zip-file-dataformat.html Sun May  4 02:17:48 2014
@@ -92,7 +92,7 @@
                              
                     </div>
     </div>
-<p>The Zip File <a shape="rect" href="data-format.html">Data Format</a>
is a message compression and de-compression format. Messages can be marshalled (compressed)
to Zip files containing a single entry, and Zip files containing a single entry can be unmarshalled
(decompressed) to the original file contents. This data format supports ZIP64, as long as
<a shape="rect" class="external-link" href="https://blogs.oracle.com/xuemingshen/entry/zip64_support_for_4g_zipfile"
rel="nofollow">Java 7 or later is being used</a>.</p><p>Since Camel 2.13.3
there is also a aggregation strategy that can aggregate multiple messages into a single Zip
file.</p><h3 id="ZipFileDataFormat-Marshal">Marshal</h3><p>In this
example we marshal a regular text/XML payload to a compressed payload using Zip file compression,
and send it to an ActiveMQ queue called MY_QUEUE.</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<p>The Zip File <a shape="rect" href="data-format.html">Data Format</a>
is a message compression and de-compression format. Messages can be marshalled (compressed)
to Zip files containing a single entry, and Zip files containing a single entry can be unmarshalled
(decompressed) to the original file contents. This data format supports ZIP64, as long as
<a shape="rect" class="external-link" href="https://blogs.oracle.com/xuemingshen/entry/zip64_support_for_4g_zipfile"
rel="nofollow">Java 7 or later is being used</a>.</p><p>Since Camel 2.12.3
there is also a aggregation strategy that can aggregate multiple messages into a single Zip
file.</p><h3 id="ZipFileDataFormat-Marshal">Marshal</h3><p>In this
example we marshal a regular text/XML payload to a compressed payload using Zip file compression,
and send it to an ActiveMQ queue called MY_QUEUE.</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;).marshal().zipFile().to(&quot;activemq:queue:MY_QUEUE&quot;);]]></script>
 </div></div><p>The name of the Zip entry inside the created Zip file is
based on the incoming <code>CamelFileName</code> message header, which is the
standard message header used by the <a shape="rect" href="file2.html">file component</a>.
Additionally, the outgoing <code>CamelFileName</code> message header is automatically
set to the value of the incoming <code>CamelFileName</code> message header, with
the ".zip" suffix. So for example, if the following route finds a file named "test.txt" in
the input directory, the output will be a Zip file named "test.txt.zip" containing a single
Zip entry named "test.txt":</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;file:input/directory?antInclude=*/.txt&quot;).marshal().zipFile().to(&quot;file:output/directory&quot;);]]></script>
@@ -146,7 +146,7 @@
        .eagerCheckCompletion()
      .setHeader(Exchange.FILE_NAME, constant(&quot;reports.zip&quot;))
    .to(&quot;file:output/directory&quot;);]]></script>
-</div></div></div><h3 id="ZipFileDataFormat-Dependencies">Dependencies</h3><p>To
use Zip files in your camel routes you need to add a dependency on <strong>camel-zipfile</strong>
which implements this data format.</p><p>If you use Maven you can just add the
following to your <code>pom.xml</code>, substituting the version number for the
latest &amp; greatest release (see <a shape="rect" href="download.html">the download
page for the latest versions</a>).</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
+</div></div><p>&#160;</p></div><h3 id="ZipFileDataFormat-Dependencies">Dependencies</h3><p>To
use Zip files in your camel routes you need to add a dependency on <strong>camel-zipfile</strong>
which implements this data format.</p><p>If you use Maven you can just add the
following to your <code>pom.xml</code>, substituting the version number for the
latest &amp; greatest release (see <a shape="rect" href="download.html">the download
page for the latest versions</a>).</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-zipfile&lt;/artifactId&gt;



Mime
View raw message