As per the java docs, invoking close() on any java.io Streams automatically invokes flush(). But I have seen in lot of examples, even in production codes, developers have ex
I guess in many cases it's because they don't know close() also invokes flush(), so they want to be safe.
close()
flush()
Anyway, using a buffered stream should make manual flushing almost redundant.