File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best practice for PrintWriter?

 
James Hodgkiss
Ranch Hand
Posts: 401
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hiya,

I've currently got this code in my servlet:



I've seen examples that don't use the BufferedWriter, so I'm wondering if the BufferedWriter really necessary / could including it or excluding it hurt performance?

NB - The output file is to record test results - about 100 characters are written to the file every second.

Cheers,
James
 
Paul Clapham
Sheriff
Pie
Posts: 20177
25
MySQL Database
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
100 characters per second? No, buffering isn't going to make much difference on such a low volume of data.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic