Flushes this output stream and forces any buffered output bytes to be written out.
if an I/O error occurs.