Not checking the return value of close () is a common, but nonetheless serious programming error. It is possible that errors in the previous write operation (2) are first reported at the last close (). Do not check the return value when closing the file can lead to silent data loss. This is especially true with NFS and disk quota.
When closing a stream, readonly cannot be selected, the IO java infrastructure cannot check this, because it does not statically check the reading and writing of streams
source share