title: Does the stream.spliterator() close the stream?
body: <p>Does the <code>stream.spliterator()</code> implicitly closes the <code>stream</code>, or there is a need to explicitly close it afterwards?</p>
  
  <pre><code>Stream&lt;String&gt; stream = Stream.of("a", "b", "c");
  Spliterator&lt;T&gt; spliterator = stream.spliterator();
  // Some low lever operation with the spliterator
  stream.close(); // do we need to close?
  </code></pre>
  
  <p>At first glance, it seems that the <code>.spliterator()</code> method closes the <code>stream</code>, but without calling <code>stream.close()</code>. At least if I close it straight away after the <code>.spliterator()</code> method is invoked, it seems not affection the spliterator operations.</p>
  
  <pre><code>Stream&lt;String&gt; stream = Stream.of("a", "b", "c").limit(2);
  Spliterator&lt;T&gt; spliterator = stream.spliterator();
  stream.close();
  // Some low lever operation with the spliterator
  </code></pre>
  
  <p>This question can be extended to other <code>stream</code> methods, for example, the <code>.findAny()</code>.</p>
  
  <pre><code>stream.findAny() // Can I assume that I don't need to close the stream?
  stream.onClose(() -&gt; System.out.println("hi!")).findAny()`
  // when the `onClose()` action will be called?
  </code></pre>
  
  <p>The reason for that question is to have deep clarity when a <code>stream</code> needs explicitly to be closed, and in the cases where I don't need to explicitly close it, when the <code>onClose()</code> defined actions will take place?</p>