Hi All,
My requirement is to read the gzip files from the source location then unzip
it and place it in destination folder.
So I have written the below code to achieve the same.
package com.evolvus.examples.camel.fileOne;
import org.apache.camel.CamelContext;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
public class App {
public static void main(final String[] args) throws Exception {
final String sourceFolder = "file:C:\\Amu\\abc\\EIAS\\Camel\\input";
final String destinationFolder =
"file:C:\\Amu\\abc\\EIAS\\Camel\\output";
final CamelContext camelContext = new DefaultCamelContext();
camelContext.addRoutes(new RouteBuilder() {
@Override
public void configure() {
from(sourceFolder)
.unmarshal().gzip()
.to(destinationFolder);
}
});
camelContext.start();
Thread.sleep(30000);
camelContext.stop();
}
}
After the code execution the output folder is containing the unzipped files
with .gz extension.
Kindly help me with this.
regards,
Amu
--
View this message in context:
http://camel.465427.n5.nabble.com/unable-to-unzip-the-gzip-files-tp5796784.html
Sent from the Camel - Users mailing list archive at Nabble.com.