@@ -0,0 +1,1320 @@
+//%0A// ParallelRead.java%0A//%0A%0Aimport java.io.File;%0Aimport loci.formats.ImageReader;%0A%0A/**%0A * Reads all files in given directory in parallel,%0A * using a separate thread for each.%0A *%0A * %3Cdl%3E%3Cdt%3E%3Cb%3ESource code:%3C/b%3E%3C/dt%3E%0A * %3Cdd%3E%3Ca href=%22https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/bio-formats/utils/ParallelRead.java%22%3ETrac%3C/a%3E,%0A * %3Ca href=%22https://skyking.microscopy.wisc.edu/svn/java/trunk/components/bio-formats/utils/ParallelRead.java%22%3ESVN%3C/a%3E%3C/dd%3E%3C/dl%3E%0A */%0Apublic class ParallelRead implements Runnable %7B%0A  private String id;%0A%0A  public ParallelRead(String id) %7B%0A    this.id = id;%0A  %7D%0A%0A  public void run() %7B%0A    try %7B%0A      ImageReader r = new ImageReader();%0A      r.setId(id);%0A      System.out.println(Thread.currentThread().getName() +%0A        %22: id=%22 + id +%0A        %22, sizeX=%22 + r.getSizeX() +%0A        %22, sizeY=%22 + r.getSizeY() +%0A        %22, sizeZ=%22 + r.getSizeZ() +%0A        %22, sizeT=%22 + r.getSizeT() +%0A        %22, sizeC=%22 + r.getSizeC());%0A      r.close();%0A    %7D%0A    catch (Exception exc) %7B%0A      exc.printStackTrace();%0A    %7D%0A  %7D%0A%0A  public static void main(String%5B%5D args) %7B%0A    String dir = args%5B0%5D;%0A    File%5B%5D list = new File(dir).listFiles();%0A    for (int i=0; i%3Clist.length; i++) %7B%0A      ParallelRead pr = new ParallelRead(list%5Bi%5D.getAbsolutePath());%0A      new Thread(pr).start();%0A    %7D%0A  %7D%0A%7D%0A

Test class for reading from many files in parallel.