title: With "ImageIO.write()" API call I get NullPointerException
body: <p>With <code>ImageIO.write()</code> API call, I get <code>NullPointerException</code> when I pass a non-existent path like <code>"\\abc\abc.png"</code>. I pass the non-existent path purposely to test something but instead of getting <code>FileNotFoundException</code>, I get <code>NPE</code>.  Why is that? </p>
  
  <p><code>ImageIO.write()</code> API is supposed to throw <code>IOException</code> but don't why I get <code>NPE</code>.</p>
  
  <p>I use exception message string to show it in a message box to user but in this case <code>NPE.getLocalizedMessage()</code> returns empty string and hence the popup is empty with just an icon on it.</p>