title: Find format of clipboard image in Java
body: <p>I'm getting images from clipboard using this:  </p>
  
  <pre><code>if(Toolkit.getDefaultToolkit().getSystemClipboard().isDataFlavorAvailable(DataFlavor.imageFlavor)){
         ImageIcon IMG = new ImageIcon((BufferedImage) Toolkit.getDefaultToolkit().getSystemClipboard().getData(DataFlavor.imageFlavor));
  }
  </code></pre>
  
  <p>Now I want to save this image in disk using <code>ImageIO.write</code>;<br>
  How can I find image format (JPG,PNG,GIF,...) to use in <code>ImageIO.write</code> as <code>formatName</code> ?  </p>
  
  <p>Thanks</p>