package cafe.test;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;

import cafe.image.tiff.TIFFTweaker;
import cafe.io.FileCacheRandomAccessOutputStream;
import cafe.io.RandomAccessOutputStream;

import java.io.FileOutputStream;

public class TestTiffMerge {

	public static void main(String[] args) throws FileNotFoundException, IOException {
		FileOutputStream out = new FileOutputStream(args[2]);
		RandomAccessOutputStream dest = new FileCacheRandomAccessOutputStream(out);
		TIFFTweaker.mergeTiffImagesEx(dest, new File(args[0]), new File(args[1]));
		// Release resources
		dest.close();
		out.close();
	}
}
@@ -227,16 +227,44 @@
 tStream;
+%0Aimport cafe.util.FileUtils;
 %0A%0Aimport
@@ -461,16 +461,90 @@
 gs%5B2%5D);%0A
+%09%09File%5B%5D files = FileUtils.listFilesMatching(new File(args%5B0%5D), args%5B1%5D);%0A
 %09%09Random
@@ -655,44 +655,13 @@
 st, 
-new File(args%5B0%5D), new File(args%5B1%5D)
+files
 );%0A%09

Update test case