Since: API Level 1
public interface

Closeable

java.io.Closeable
Known Indirect Subclasses

Class Overview

Defines an interface for classes that can (or need to) be closed once they are not used any longer. This usually includes all sorts of InputStreams and OutputStreams. Calling the close method releases resources that the object holds.

A common pattern for using a Closeable 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 ()

Since: API Level 1

Closes the object and release any system resources it holds. If the object has already been closed, then invoking this method has no effect.

Throws
IOException if any error occurs when closing the object.