Java OutputStream flush() Method
The flush() method of OutputStream class is used to flush the content of the buffer to the output stream. A buffer is a portion in memory that is used to store a stream of data(characters). That data sometimes will only get sent to an output device, when the buffer is full.
The flush method of OutputStream does nothing.
flush in interface Flushable
IOException– If an I/O error occurs.