Sometimes output streams are buffered by the operating system for performance.
flush() method forces the data to be written whether or not the
buffer is full.
This is not the same as the buffering performed by a
BufferedOutputStream. That buffering is handled by the Java
runtime. This buffering is at the native OS level.
However, a call to
flush() should empty both buffers