この例では、入力ディレクトリーで見つかったすべてのテキストファイルを、出力ディレクトリーに格納される 1 つの Tar ファイルに集約します。
from("file:input/directory?antInclude=*/.txt")
.aggregate(new TarAggregationStrategy())
.constant(true)
.completionFromBatchConsumer()
.eagerCheckCompletion()
.to("file:output/directory");
from("file:input/directory?antInclude=*/.txt")
.aggregate(new TarAggregationStrategy())
.constant(true)
.completionFromBatchConsumer()
.eagerCheckCompletion()
.to("file:output/directory");
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
from("file:input/directory?antInclude=*/.txt")
.aggregate(new TarAggregationStrategy())
.constant(true)
.completionFromBatchConsumer()
.eagerCheckCompletion()
.setHeader(Exchange.FILE_NAME, constant("reports.tar"))
.to("file:output/directory");
from("file:input/directory?antInclude=*/.txt")
.aggregate(new TarAggregationStrategy())
.constant(true)
.completionFromBatchConsumer()
.eagerCheckCompletion()
.setHeader(Exchange.FILE_NAME, constant("reports.tar"))
.to("file:output/directory");
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow