The idea behind a BufferedWriter is that it groups a series of small IO operations, into a single large operation. It is usually more efficient to do a single large operation than several small operations if the overhead of doing an operation is high (as it is with IO). However, if you have not placed enough information in the buffer to cause it to automatically empty, you must do so manually with a call to the flush() method before your program terminates. Failure to do so will cause the data in the buffer to be lost. It is a good practice to always call flush() and close() when you are done with a stream.