title: Dumping a Java StringBuilder to File
body: <p>What is the most efficient/elegant way to dump a StringBuilder to a text file?</p>
  
  <p>You can do:</p>
  
  <pre><code>outputStream.write(stringBuilder.toString().getBytes());
  </code></pre>
  
  <p>But is this efficient for a very long file?</p>
  
  <p>Is there a better way?</p>