I know that since Java 1.5 PrintWriter
preforms internal buffering even if it created with PrintWriter(String fileName)
constructor. So i don't need tedious decoration like this:
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("File")));
So I am wondering whether it still make sense to manually decorate Streams/Readers/Writers classes or PrintWriter
is a particular case? For instance:
ObjectOutputStream out = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream("File")));
In all tutorials such things declared without BufferedOutputStream
. But does it really improve performance or not? Or now i can just use constructors without intermediate buffer's constructor with current I/O classes?