title: Performance : BufferedOutputStream vs FileOutputStream in Java
body: <p>I have read that BufferedOutputStream Class improves efficiency and must be used with FileOutputStream in this way -</p>
  
  <pre><code>BufferedOutputStream bout = new BufferedOutputStream(new FileOutputStream("myfile.txt"));
  </code></pre>
  
  <p>and for writing to the same file below statement is also works -</p>
  
  <pre><code>FileOutputStream fout = new FileOutputStream("myfile.txt");
  </code></pre>
  
  <p>But the recommended way is to use Buffer for reading / writing operations and that's the reason only I too prefer to use Buffer for the same.</p>
  
  <p>But my question is how to measure performance of above 2 statements. Is their any tool or kind of something, don't know exactly what? but which will be useful to analyse it's performance.</p>
  
  <p>As new to JAVA language, I am very curious to know about it.</p>