Java FileWriter V/S BufferedWriter.

Today we will look at java character stream writer. Standard implementation FileWriter class is used to write character stream into the underlying file system. FileWriter class provides API to write character by character, character array and String. BufferedWriter is a process stream used to decorate the IO stream FileWriter. The process stream BufferedWriter helps to reduce the real IO operation, BufferedWriter comes with standard buffer size 8192. We can pass in the size of the buffer on the time of instantiation based on the availability of main memory. BufferedWriter improve the performance of file writing with the help of in memory buffer that in turn reduce the IO operation.

One thought on “Java FileWriter V/S BufferedWriter.