Bad things that can happen when you do not close your threads:
- you may run out of file descriptors
- data that you think is written to disk can still be in the buffer (only)
- files may be locked for other processes (platform dependent)
- ...
Yes, the close operation always clears the stream.
, , . , FileOutputStream
, FileInputStream
/ a Socket
. FileOutputStream
BufferedOutputStream
, BufferedOutputStream
/ . , , BufferedOutputStream
, FileOutputStream
, .