Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this object and releases all resources associated with it.
|
boolean |
isClosed()
Returns
true if the current object is closed. |
void close()
close
in interface java.lang.AutoCloseable
AutoCloseable.close()
, cases where the close may fail require
careful attention. It is strongly advised to relinquish the underlying resources and to
internally mark the Closeable
as closed, prior to throwing an exception.
Implementers of this interface are strongly advised to not have the close
method
throw any exception. It is supposed that the close operation cannot fail. Only in case of an
unexpected error the implementers can throw a runtime exception.
boolean isClosed()
true
if the current object is closed.