title: Closing a nested stream closes its parent streams too?
body: <pre class="lang-java prettyprint-override"><code>OutputStream fos;
  OutputStream bos;
  OutputStream zos;
  try {
      fos = new FileOutputStream(anyFile);
      bos = new BufferedOutputStream(fos);
      zos = new ZipOutputStream(bos);
  } finally {
      if (zos != null) {
          zos.close(); // + exception handling
      }
  }
  </code></pre>
  
  <p>Does closing <code>zos</code> automatically closes <code>bos</code> and <code>fos</code> too, or do I need to close them manually?</p>