finalize method has been deprecated and will be removed.
Subclasses that override finalize in order to perform cleanup
should be modified to use alternative cleanup mechanisms and
to remove the overriding finalize method.
When overriding the finalize method, its implementation must explicitly
ensure that super.finalize() is invoked as described in Object.finalize.
See the specification for Object.finalize() for further
information about migration options.
Ensures that the close method of this file input stream is
called when there are no more references to it.
The finalize method does not call close directly.
IOException | if an I/O error occurs. |
java.io.FileInputStream.close()
@apiNote
To release resources used by this stream close should be called
directly or by try-with-resources.
@implSpec
If this FileInputStream has been subclassed and the close
method has been overridden, the close method will be
called when the FileInputStream is unreachable.
Otherwise, it is implementation specific how the resource cleanup described in
close is performed.
Diagram: InputStream