title: Unable to acquire image through ImageIO.read(url) because of connection timed out
body: <p>The following code always seems to fail:</p>
  
  <pre><code>    URL url = new URL("http://userserve-ak.last.fm/serve/126/8636005.jpg");
      Image img = ImageIO.read(url);
      System.out.println(img);
  </code></pre>
  
  <p>I've checked the url, and it is a valid jpg image. The error I get is:</p>
  
  <blockquote>
    <p>Exception in thread "main" javax.imageio.IIOException: Can't get input stream from URL!<br>
            at javax.imageio.ImageIO.read(ImageIO.java:1385)<br>
            at maestro.Main2.main(Main2.java:25)</p>
    
    <p>Caused by: java.net.ConnectException: Connection timed out<br>
            at java.net.PlainSocketImpl.socketConnect(Native Method)<br>
            at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)<br>
            at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)<br>
            at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)<br>
            at java.net.Socket.connect(Socket.java:546)<br>
            at java.net.Socket.connect(Socket.java:495)<br>
            at sun.net.NetworkClient.doConnect(NetworkClient.java:174)<br>
            at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)<br>
            at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)<br>
            at sun.net.www.http.HttpClient.(HttpClient.java:240)<br>
            at sun.net.www.http.HttpClient.New(HttpClient.java:321)<br>
            at sun.net.www.http.HttpClient.New(HttpClient.java:338)<br>
            at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:814)<br>
            at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:755)<br>
            at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:680)<br>
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1005)<br>
            at java.net.URL.openStream(URL.java:1029)<br>
            at javax.imageio.ImageIO.read(ImageIO.java:1383)<br>
            ... 1 more</p>
    
    <p>Java Result: 1</p>
  </blockquote>
  
  <p>What does this mean?
  Funny thing is, if I change my internet-connection to that of the neighbour's wireless, it suddenly works.</p>