title: Java BufferedReader readline blocking?
body: <p>I want to make an HTTP request and then get the response as sketched here:</p>
  
  <pre><code>URLConnection c = new URL("http://foo.com").openConnection();
  c.setDoOutput(true);
  
  /* write an http request here using a new OutputStreamWriter(c.getOutputStream) */
  
  BufferedReader reader = new BufferedReader(new InputStreamReader(c.getInputStream));
  reader.readLine();
  </code></pre>
  
  <p>But my question is, if the request I send takes a long time before a response is received, what happens in the call reader.readLine() above? Will this process stay running/runnable on the CPU or will it get taken off the CPU and be notified to wake up and run again when there is IO to be read?</p>
  
  <p>If it stays on the CPU, what can be done to make it get off and be notified later? </p>