title: If it safe to return an InputStream from try-with-resource
body: <p>Is it <strong>safe</strong> to return an input stream from a try-with-resource statement to handle the closing of the stream once the caller has consumed it?</p>
  
  <pre><code>public static InputStream example() throws IOException {
      ...
      try (InputStream is = ...) {
          return is;
      }
  }
  </code></pre>