title: HttpURLConnection GET download file, doesn't return anything.
body: <p>I am using HttpURLConnection to download a xml file. I can see the file in my web browser, it takes over 10 seconds to load. But i can see the content eventually. But I am not able to download it through my java code. It seems like all my SetTimeOut() don't really work. Here is my code, please help:</p>
  
  <pre><code>        HttpURLConnection con = (HttpURLConnection) laURL.openConnection();
          con.setRequestMethod("GET");
          con.setRequestProperty("Content-Type", "text/xml; charset=utf-8");
  
          con.setConnectTimeout(15*1000);
          con.setReadTimeout(15*1000);
  
          InputStream ins = con.getInputStream();
          InputStreamReader isr = new InputStreamReader(ins);
          BufferedReader in = new BufferedReader(isr);
  
          String inputLine;
          while ((inputLine = in.readLine()) != null)
          {
              System.out.println(inputLine);
          }
          in.close();
  </code></pre>