SafeCloseable can be safely closed without risk of an exception being thrown.
This interface extends AutoCloseable so instances can be used in try-with-resources clauses.
Implementation Note
Similar to java., implementors should make their close() idempotent.
In other words, it should be safe to call close() multiple times on the same instance.
This is a restriction beyond what AutoCloseable provides.
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Redeclares java. |
| close | back to summary |
|---|---|
| public void close() Redeclares java. Doc from java. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
| |