java.io
Interface Closeable

All Known Subinterfaces:
ByteChannel, Channel, GatheringByteChannel, InterruptibleChannel, ReadableByteChannel, ScatteringByteChannel, WritableByteChannel
All Known Implementing Classes:
AbstractInterruptibleChannel, AbstractSelectableChannel, AudioInputStream, BufferedInputStream, BufferedOutputStream, BufferedReader, BufferedWriter, ByteArrayInputStream, ByteArrayOutputStream, CharArrayReader, CharArrayWriter, CheckedInputStream, CheckedOutputStream, CipherInputStream, CipherOutputStream, DatagramChannel, DataInputStream, DataOutputStream, DeflaterOutputStream, DigestInputStream, DigestOutputStream, FileChannel, FileInputStream, FileOutputStream, FileReader, FileWriter, FilterInputStream, FilterOutputStream, FilterReader, FilterWriter, Formatter, GZIPInputStream, GZIPOutputStream, InflaterInputStream, InputStream, InputStream, InputStream, InputStreamReader, JarInputStream, JarOutputStream, LineNumberInputStream, LineNumberReader, LogStream, ObjectInputStream, ObjectOutputStream, OutputStream, OutputStream, OutputStream, OutputStreamWriter, Pipe.SinkChannel, Pipe.SourceChannel, PipedInputStream, PipedOutputStream, PipedReader, PipedWriter, PrintStream, PrintWriter, ProgressMonitorInputStream, PushbackInputStream, PushbackReader, RandomAccessFile, Reader, SelectableChannel, SequenceInputStream, ServerSocketChannel, SocketChannel, StringBufferInputStream, StringReader, StringWriter, Writer, ZipInputStream, ZipOutputStream

public interface Closeable

A Closeable class represents a stream of data, which can be closed when it is no longer needed. Closing a stream allows the resources it uses to be freed for an alternate use.

Since:
1.5

Method Summary
 void close()
          Closes the stream represented by this class, thus freeing system resources.
 

Method Detail

close

void close()
           throws IOException
Closes the stream represented by this class, thus freeing system resources. In that case that the stream is already in the closed state, this method has no effect.

Throws:
IOException - if an I/O error occurs in closing.