Android APIs
Added in API level 19
public interface

AutoCloseable

java.lang.AutoCloseable
Known Indirect Subclasses

Class Overview

Defines an interface for classes that can (or need to) be closed once they are not used any longer. Calling the close method releases resources that the object holds.

A common pattern for using an AutoCloseable resource:

   Closable foo = new Foo();
   try {
      ...;
    finally {
      foo.close();
   }
 }

Summary

Public Methods
abstract void close()
Closes the object and release any system resources it holds.

Public Methods

public abstract void close ()

Added in API level 19

Closes the object and release any system resources it holds.

Throws
Exception