title: Reading TIFF file using JAI
body: <p>My goal is to modify a TIFF file. I try to read the file using ImageIO. The attempt to get an ImageReader for TIFF file leads to NoSuchElementException. Here is my code:</p>
  
  <pre><code>Iterator iterator = ImageIO.getImageReadersByFormatName("tiff");
  // Next code string throws java.util.NoSuchElementException
  ImageReader reader = (ImageReader) iterator.next();
  ImageInputStream is = null;
  
  try {
      is = new FileImageInputStream(new File(sourceFilePath));
      reader.setInput(is, false, true);
      int pageNum = reader.getNumImages(true);
      System.out.println(pageNum);
  } catch (Exception e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p>I would appreciate any help on this problem.</p>