Spec-Zone .ru
спецификации, руководства, описания, API
|
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AutoCloseable
A resource that must be closed when it is no longer needed.
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this resource, relinquishing any underlying resources. |
Method Detail |
---|
void close() throws Exception
try
-with-resources statement.
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 close
method of Closeable
, this close
method
is not required to be idempotent. In other words,
calling this 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
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1993, 2010, Oracle Corporation. All rights reserved.