title: Closing inputstreams in Java
body: <p>I have the following piece of code in a try/catch block</p>
  
  <pre><code> InputStream inputstream = conn.getInputStream();
   InputStreamReader inputstreamreader = new  InputStreamReader(inputstream);
   BufferedReader bufferedreader = new BufferedReader(inputstreamreader);
  </code></pre>
  
  <p>My question is that when I have to close these streams in the finally block, do I have to close all the 3 streams or just closing the <em>befferedreader</em> will close all the other streams ?</p>