title: Read and Write the files with try-with-resources
body: <p>I want to read and write in the same try-with-resource for a very large file. Do try-with-resource take care of the exceptions thrown with in the its body. </p>
  
  <pre><code>try (Stream&lt;String&gt; stream = Files.lines(Paths.get("source.txt"), Charset.defaultCharset());
              BufferedWriter writer = Files.newBufferedWriter(Paths.get("dest.txt"))) {
          stream.map(String::trim).map(String::toUpperCase).forEach(writer::write);
      } catch (Exception e) {
          e.printStackTrace();
      }
  </code></pre>