IFConcatenator concatenator = new IFConcatenator(targetHandler, null);
//Iterate over all intermediate files
for (int i = 0; i < files.length; i++) {
Source src = new StreamSource(files[i]);
concatenator.appendDocument(src);
}
//Signal the end of the processing so the target file can be finalized properly.
concatenator.finish();
} finally {