title: java.io.IOException: BufferedInputStream is closed in Android 2.3
body: <p>The following code is working fine in Android 1.5-2.2.1 but it's not in 2.3 and higher.</p>
  
  <pre><code>BufferedReader rd;
  rd = new BufferedReader(new InputStreamReader(connection.getInputStream()));
  
  StringBuffer sb = new StringBuffer();
  String line;
  while ((line = rd.readLine()) != null){
      sb.append(line);
  }
  rd.close();
  </code></pre>
  
  <p>The stracktrace:</p>
  
  <pre><code>01-30 08:21:42.668: WARN/System.err(594): java.io.IOException: BufferedInputStream is closed
  01-30 08:21:42.668: WARN/System.err(594):     at java.io.BufferedInputStream.streamClosed(BufferedInputStream.java:116)
  01-30 08:21:42.728: WARN/System.err(594):     at java.io.BufferedInputStream.read(BufferedInputStream.java:274)
  01-30 08:21:42.728: WARN/System.err(594):     at org.apache.harmony.luni.internal.net.www.protocol.http.UnknownLengthHttpInputStream.read(UnknownLengthHttpInputStream.java:40)
  01-30 08:21:42.758: WARN/System.err(594):     at java.io.InputStreamReader.read(InputStreamReader.java:255)
  01-30 08:21:42.758: WARN/System.err(594):     at java.io.BufferedReader.fillBuf(BufferedReader.java:128)
  01-30 08:21:42.758: WARN/System.err(594):     at java.io.BufferedReader.readLine(BufferedReader.java:357)
  </code></pre>
  
  <p>Is this an issue? Has anything changed in 2.3??</p>