title: ImageIO.read() returns 403 error
body: <p>I have the following code:</p>
  
  <pre><code>public BufferedImage urlToImage(String imageUrl) throws MalformedURLException, IOException {
      URL url = new URL(imageUrl);
      BufferedImage image = ImageIO.read(url);
      return image;
  }
  </code></pre>
  
  <p>That is supposed to return an image from a given URL.</p>
  
  <p>I tested with these two randomly chosen URLs:</p>
  
  <ul>
  <li><a href="https://www.google.co.ma/images/srpr/logo4w.png" rel="noreferrer">https://www.google.co.ma/images/srpr/logo4w.png</a></li>
  <li><a href="http://www.earthtimes.org/newsimage/osteoderms-storing-minerals-helped-huge-dinosaurs-survive_3011.jpg" rel="noreferrer">http://www.earthtimes.org/newsimage/osteoderms-storing-minerals-helped-huge-dinosaurs-survive_3011.jpg</a></li>
  </ul>
  
  <p>The first one works fine, but the second gives a 403 error:</p>
  
  <pre><code>Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.earthtimes.org/newsimage/osteoderms-storing-minerals-helped-huge-dinosaurs-survive_3011.jpg
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
  at java.net.URL.openStream(URL.java:1010)
  at javax.imageio.ImageIO.read(ImageIO.java:1367)
  </code></pre>
  
  <p>What could be the cause of the error ? Thanks.</p>