Hi Vladimir,

Thanks for pointing this out. Would you care to submit a patch for this?

On the custom data format topic, of course you can. You'd have to write your own component with your data format code (class extending org.apache.camel.spi.DataFormat). You can find a more isolated example in the camel-hl7 component.

Cheers,
Hadrian

On Oct 2, 2009, at 6:29 PM, Vladimir Okhotnikov wrote:


Hi

first of all, thanks for the great framework. The learning curve is a bit,
steep, but the possibilities are surely worth it.

Apparently I have a small problem with a ZIP data format. In my project, I have to download zipped files from FTP, uncompress and process them. So, I
guess the route should be like:
 from("ftp://...";).unmarshal().zip().to(...)
While writing a test for that particular route, I've created a small test
zip file and tried to process it - with no luck - all I got was the
ZipException "unknown compression method"

I also tried feeding the actual zip file from the FTP, with the same result.

Eventually I looked at the code, and found that zip data format processing is being done by org.apache.camel.impl.ZipDataFormat class. What's strange
is that the class uses java.zip.InflaterOutputStream (and its
DeflaterOutputStream counterpart). Now, by no means I'm an expert in
compression methods, but the java API docs claims that those classes use "deflate" method, not "zip". For "zip" method I think ZipInputStream must be
used instead?

As a side note, can anyone give me an advice whether it is possible to add a
custom data format without modifying/recompiling camel code?

Regards,
Vladimir Okhotnikov
--
View this message in context: 
http://www.nabble.com/Zip-format-problem-tp25723682p25723682.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Reply via email to