title: Java read different type of image formats jpg,tif,gif,png
body: <p>I am trying to read some image files jpg, tif, gif, png and need to save files and create icons.
  And i am getting <code>UnsupportedTypeException</code>.</p>
  
  <pre><code>ImageIO.read(file);
  </code></pre>
  
  <p>If i use following line, as earlier discuss in form.</p>
  
  <pre><code>BufferedImage img = JPEGCodec.createJPEGDecoder(inputStream).decodeAsBufferedImage();
  </code></pre>
  
  <p>I get <code>JPEGCodec</code> cannot found symbol.</p>
  
  <p>I am using netbean 7.0.1. I have also added jai-imageio.jar.</p>