Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Closeable

public interface Closeable
implements AutoCloseable

java.io.Closeable
Known Indirect Subclasses


An AutoCloseable whose close method may throw an IOException.

Summary

Public methods

abstract void close()

Closes the object and release any system resources it holds.

Inherited methods

From interface java.lang.AutoCloseable

Public methods

close

Added in API level 1
void close ()

Closes the object and release any system resources it holds.

Although only the first call has any effect, it is safe to call close multiple times on the same object. This is more lenient than the overridden AutoCloseable.close(), which may be called at most once.

Throws
IOException
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.