Skip to content

Commit

Permalink
Fix issue #89
Browse files Browse the repository at this point in the history
  • Loading branch information
eh3rrera committed Dec 16, 2019
1 parent be00cef commit c89857c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ch23.html
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ <h2>BufferedWriter</h2>
<p><code class="java hljs"><span class="hljs-keyword">try</span> ( BufferedWriter bw =<br />
<span class="hljs-keyword">&nbsp; &nbsp; &nbsp;new</span> BufferedWriter( <span class="hljs-keyword">new</span> FileWriter(<span class="hljs-string">"/file.txt"</span>) ) ) {<br />
&nbsp; &nbsp;w.write(<span class="hljs-string">"Writing to the file..."</span>);<br />
&nbsp; &nbsp;w.newLine();<br />
} <span class="hljs-keyword">catch</span>(IOException e) { <span class="hljs-comment">/** ... */</span> }</code></p>

<p>Since data is written to a buffer first, you can call the <code>flush()</code> method to make sure that the text written until that moment is indeed written to the disk.</p>
Expand Down

0 comments on commit c89857c

Please sign in to comment.