title: Why you can read data from already closed ByteArrayOutputStream?
body: <p>I'm wondering why you still can read bytes from already closed <code>ByteArrayOutputStream</code>. Doesn't this line from docs mean the opposite?</p>
  
  <blockquote>
    <p><code>public void close ()</code>: Closes this stream. This releases system resources used for this stream.</p>
  </blockquote>
  
  <p><strong><em>Sample code:</em></strong> </p>
  
  <pre><code>String data = "Some string ...";
  ByteArrayOutputStream bOut = new ByteArrayOutputStream();
  DataOutputStream dOut = new DataOutputStream(bOut);
  dOut.write(data.getBytes());
  dOut.close();
  System.out.println("Length: " + bOut.toByteArray().length);
  System.out.println("Byte #2: " + bOut.toByteArray()[2]);
  </code></pre>
  
  <p><strong><em>Output:</em></strong></p>
  
  <pre><code>Length: 15
  Byte #2: 109
  </code></pre>
  
  <p>Am I doing something wrong?</p>