尝试使用 Apache Camel 解压缩文件,我尝试了http://camel.apache.org/zip-file-dataformat.html中给出的示例,但我找不到UnZippedMessageProcessor类。这是代码:
import java.util.Iterator;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.dataformat.zipfile.ZipFileDataFormat;
public class TestRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
ZipFileDataFormat zipFile = new ZipFileDataFormat();
zipFile.setUsingIterator(true);
from("file:src/test/resources/org/apache/camel/dataformat/zipfile/")
.unmarshal(zipFile).split(body(Iterator.class)).streaming()
.process(new UnZippedMessageProcessor()).end();
}
}
有人尝试过这样做或有其他方法通过骆驼路线解压缩文件吗?
先感谢您!