java.io
Interface Closeable

All Known Subinterfaces:
ByteChannel sample code for java.nio.channels.ByteChannel definition code for java.nio.channels.ByteChannel , Channel sample code for java.nio.channels.Channel definition code for java.nio.channels.Channel , GatheringByteChannel sample code for java.nio.channels.GatheringByteChannel definition code for java.nio.channels.GatheringByteChannel , InterruptibleChannel sample code for java.nio.channels.InterruptibleChannel definition code for java.nio.channels.InterruptibleChannel , ReadableByteChannel sample code for java.nio.channels.ReadableByteChannel definition code for java.nio.channels.ReadableByteChannel , ScatteringByteChannel sample code for java.nio.channels.ScatteringByteChannel definition code for java.nio.channels.ScatteringByteChannel , WritableByteChannel sample code for java.nio.channels.WritableByteChannel definition code for java.nio.channels.WritableByteChannel
All Known Implementing Classes:
AbstractInterruptibleChannel sample code for java.nio.channels.spi.AbstractInterruptibleChannel definition code for java.nio.channels.spi.AbstractInterruptibleChannel , AbstractSelectableChannel sample code for java.nio.channels.spi.AbstractSelectableChannel definition code for java.nio.channels.spi.AbstractSelectableChannel , AudioInputStream sample code for javax.sound.sampled.AudioInputStream definition code for javax.sound.sampled.AudioInputStream , BufferedInputStream sample code for java.io.BufferedInputStream definition code for java.io.BufferedInputStream , BufferedOutputStream sample code for java.io.BufferedOutputStream definition code for java.io.BufferedOutputStream , BufferedReader sample code for java.io.BufferedReader definition code for java.io.BufferedReader , BufferedWriter sample code for java.io.BufferedWriter definition code for java.io.BufferedWriter , ByteArrayInputStream sample code for java.io.ByteArrayInputStream definition code for java.io.ByteArrayInputStream , ByteArrayOutputStream sample code for java.io.ByteArrayOutputStream definition code for java.io.ByteArrayOutputStream , CharArrayReader sample code for java.io.CharArrayReader definition code for java.io.CharArrayReader , CharArrayWriter sample code for java.io.CharArrayWriter definition code for java.io.CharArrayWriter , CheckedInputStream sample code for java.util.zip.CheckedInputStream definition code for java.util.zip.CheckedInputStream , CheckedOutputStream sample code for java.util.zip.CheckedOutputStream definition code for java.util.zip.CheckedOutputStream , DatagramChannel sample code for java.nio.channels.DatagramChannel definition code for java.nio.channels.DatagramChannel , DataInputStream sample code for java.io.DataInputStream definition code for java.io.DataInputStream , DataOutputStream sample code for java.io.DataOutputStream definition code for java.io.DataOutputStream , DeflaterOutputStream sample code for java.util.zip.DeflaterOutputStream definition code for java.util.zip.DeflaterOutputStream , DigestInputStream sample code for java.security.DigestInputStream definition code for java.security.DigestInputStream , DigestOutputStream sample code for java.security.DigestOutputStream definition code for java.security.DigestOutputStream , FileChannel sample code for java.nio.channels.FileChannel definition code for java.nio.channels.FileChannel , FileInputStream sample code for java.io.FileInputStream definition code for java.io.FileInputStream , FileOutputStream sample code for java.io.FileOutputStream definition code for java.io.FileOutputStream , FileReader sample code for java.io.FileReader definition code for java.io.FileReader , FileWriter sample code for java.io.FileWriter definition code for java.io.FileWriter , FilterInputStream sample code for java.io.FilterInputStream definition code for java.io.FilterInputStream , FilterOutputStream sample code for java.io.FilterOutputStream definition code for java.io.FilterOutputStream , FilterReader sample code for java.io.FilterReader definition code for java.io.FilterReader , FilterWriter sample code for java.io.FilterWriter definition code for java.io.FilterWriter , Formatter sample code for java.util.Formatter definition code for java.util.Formatter , GZIPInputStream sample code for java.util.zip.GZIPInputStream definition code for java.util.zip.GZIPInputStream , GZIPOutputStream sample code for java.util.zip.GZIPOutputStream definition code for java.util.zip.GZIPOutputStream , InflaterInputStream sample code for java.util.zip.InflaterInputStream definition code for java.util.zip.InflaterInputStream , InputStream sample code for java.io.InputStream definition code for java.io.InputStream , InputStream sample code for org.omg.CORBA.portable.InputStream definition code for org.omg.CORBA.portable.InputStream , InputStream sample code for org.omg.CORBA_2_3.portable.InputStream definition code for org.omg.CORBA_2_3.portable.InputStream , InputStreamReader sample code for java.io.InputStreamReader definition code for java.io.InputStreamReader , JarInputStream sample code for java.util.jar.JarInputStream definition code for java.util.jar.JarInputStream , JarOutputStream sample code for java.util.jar.JarOutputStream definition code for java.util.jar.JarOutputStream , LineNumberInputStream sample code for java.io.LineNumberInputStream definition code for java.io.LineNumberInputStream , LineNumberReader sample code for java.io.LineNumberReader definition code for java.io.LineNumberReader , LogStream sample code for java.rmi.server.LogStream definition code for java.rmi.server.LogStream , ObjectInputStream sample code for java.io.ObjectInputStream definition code for java.io.ObjectInputStream , ObjectOutputStream sample code for java.io.ObjectOutputStream definition code for java.io.ObjectOutputStream , OutputStream sample code for java.io.OutputStream definition code for java.io.OutputStream , OutputStream sample code for org.omg.CORBA.portable.OutputStream definition code for org.omg.CORBA.portable.OutputStream , OutputStream sample code for org.omg.CORBA_2_3.portable.OutputStream definition code for org.omg.CORBA_2_3.portable.OutputStream , OutputStreamWriter sample code for java.io.OutputStreamWriter definition code for java.io.OutputStreamWriter , Pipe.SinkChannel sample code for java.nio.channels.Pipe.SinkChannel definition code for java.nio.channels.Pipe.SinkChannel , Pipe.SourceChannel sample code for java.nio.channels.Pipe.SourceChannel definition code for java.nio.channels.Pipe.SourceChannel , PipedInputStream sample code for java.io.PipedInputStream definition code for java.io.PipedInputStream , PipedOutputStream sample code for java.io.PipedOutputStream definition code for java.io.PipedOutputStream , PipedReader sample code for java.io.PipedReader definition code for java.io.PipedReader , PipedWriter sample code for java.io.PipedWriter definition code for java.io.PipedWriter , PrintStream sample code for java.io.PrintStream definition code for java.io.PrintStream , PrintWriter sample code for java.io.PrintWriter definition code for java.io.PrintWriter , ProgressMonitorInputStream sample code for javax.swing.ProgressMonitorInputStream definition code for javax.swing.ProgressMonitorInputStream , PushbackInputStream sample code for java.io.PushbackInputStream definition code for java.io.PushbackInputStream , PushbackReader sample code for java.io.PushbackReader definition code for java.io.PushbackReader , RandomAccessFile sample code for java.io.RandomAccessFile definition code for java.io.RandomAccessFile , Reader sample code for java.io.Reader definition code for java.io.Reader , SelectableChannel sample code for java.nio.channels.SelectableChannel definition code for java.nio.channels.SelectableChannel , SequenceInputStream sample code for java.io.SequenceInputStream definition code for java.io.SequenceInputStream , ServerSocketChannel sample code for java.nio.channels.ServerSocketChannel definition code for java.nio.channels.ServerSocketChannel , SocketChannel sample code for java.nio.channels.SocketChannel definition code for java.nio.channels.SocketChannel , StringBufferInputStream sample code for java.io.StringBufferInputStream definition code for java.io.StringBufferInputStream , StringReader sample code for java.io.StringReader definition code for java.io.StringReader , StringWriter sample code for java.io.StringWriter definition code for java.io.StringWriter , Writer sample code for java.io.Writer definition code for java.io.Writer , ZipInputStream sample code for java.util.zip.ZipInputStream definition code for java.util.zip.ZipInputStream , ZipOutputStream sample code for java.util.zip.ZipOutputStream definition code for java.util.zip.ZipOutputStream

public interface Closeable

A Closeable is a source or destination of data that can be closed. The close method is invoked to release resources that the object is holding (such as open files).

Since:
1.5

Method Summary
 void close sample code for java.io.Closeable.close() definition code for java.io.Closeable.close() ()
          Closes this stream and releases any system resources associated with it.
 

Method Detail

close sample code for java.io.Closeable.close() definition code for java.io.Closeable.close()

void close()
           throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs