public interface AutoCloseable
|Modifier and Type||Method and Description|
Close this resource, relinquishing any underlying resources.
void close() throws Exception
Classes implementing this method are strongly encouraged to be declared to throw more specific exceptions (or no exception at all, if the close cannot fail).
Note that unlike the
is not required to be idempotent. In other words,
close method more than once may have some
visible side effect, unlike
Closeable.close which is
required to have no effect if called more than once.
Exception- if this resource cannot be closed
Submit a bug or feature Copyright © 1993, 2010, Oracle Corporation. All rights reserved.
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2010, Oracle Corporation. All rights reserved.