March 2005
Beginner to intermediate
1254 pages
104h 21m
English
Closeable
This interface defines a
close( )
method and is implemented by closeable objects such as
java.io streams and java.nio
channels. This interface was added in Java 5.0 to enable
java.util.Formatter to distinguish
java.lang.Appendable objects that need to be
closed (such as streams) from those that do not (such as
StringBuilder objects). See also
Flushable.
public interface Closeable { // Public Instance Methods void close( ) throws IOException; }
InputStream, OutputStream,
PrintStream, RandomAccessFile,
Reader, Writer,
java.nio.channels.Channel,
java.util.Formatter
Read now
Unlock full access