The ZipDataFormat expects an InputStream and will return a ByteArray by
unmarshalling the payload.
If you read a ZIP file, you can convert it to an InputStream. But than, you
have to create a java.util.zip.ZipFile or a java.util.zip.ZipInputStream to
extract all entries from the archive. Than you can iterate over the
entries, extract it and process all of them further...

Best,
Christian

On Thu, May 24, 2012 at 2:23 PM, Tyler Durvik <phangb...@gmail.com> wrote:

> Thank you.  I have one more question.  What is the difference between
> zip the body and a zip file as the body of a message?
>
>
>
> On Thu, May 24, 2012 at 1:18 AM, Claus Ibsen <claus.ib...@gmail.com>
> wrote:
> > On Wed, May 23, 2012 at 10:43 PM, Tyler Durvik <phangb...@gmail.com>
> wrote:
> >> I am receiving data message from client and the body of the message is
> >> a zip file containing multiple files.  What is the best method to
> >> process the zip data?  I assume that I should use a StreamMessage.  Is
> >> there support for Camel to unzip the body as I receive it like
> >> marshaling or do I need to write an unzip processor or splitter.
> >>
> >> Thank you for your time,
> >> Tyler
> >
> > You would need to write code to unzip that yourself.
> >
> > The zip/gzip data formats is for compressing/decompression message
> > bodies, not zip files.
> >
> > There is a JIRA ticket to see if we can add support for zip files as
> well.
> > Contributions is as always welcome.
> >
> > For example maybe a iterator that can walk the zip file entries, which
> > you can then use with the Splitter EIP to process each file by file.
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> > FuseSource
> > Email: cib...@fusesource.com
> > Web: http://fusesource.com
> > Twitter: davsclaus, fusenews
> > Blog: http://davsclaus.blogspot.com/
> > Author of Camel in Action: http://www.manning.com/ibsen/
>

Reply via email to