Package java.io

Interface Summary
Closeable sample code for java.io.Closeable definition code for java.io.Closeable A Closeable is a source or destination of data that can be closed.
DataInput sample code for java.io.DataInput definition code for java.io.DataInput The DataInput interface provides for reading bytes from a binary stream and reconstructing from them data in any of the Java primitive types.
DataOutput sample code for java.io.DataOutput definition code for java.io.DataOutput The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream.
Externalizable sample code for java.io.Externalizable definition code for java.io.Externalizable Only the identity of the class of an Externalizable instance is written in the serialization stream and it is the responsibility of the class to save and restore the contents of its instances.
FileFilter sample code for java.io.FileFilter definition code for java.io.FileFilter A filter for abstract pathnames.
FilenameFilter sample code for java.io.FilenameFilter definition code for java.io.FilenameFilter Instances of classes that implement this interface are used to filter filenames.
Flushable sample code for java.io.Flushable definition code for java.io.Flushable A Flushable is a destination of data that can be flushed.
ObjectInput sample code for java.io.ObjectInput definition code for java.io.ObjectInput ObjectInput extends the DataInput interface to include the reading of objects.
ObjectInputValidation sample code for java.io.ObjectInputValidation definition code for java.io.ObjectInputValidation Callback interface to allow validation of objects within a graph.
ObjectOutput sample code for java.io.ObjectOutput definition code for java.io.ObjectOutput ObjectOutput extends the DataOutput interface to include writing of objects.
ObjectStreamConstants sample code for java.io.ObjectStreamConstants definition code for java.io.ObjectStreamConstants Constants written into the Object Serialization Stream.
Serializable sample code for java.io.Serializable definition code for java.io.Serializable Serializability of a class is enabled by the class implementing the java.io.Serializable interface.
 

Class Summary
BufferedInputStream sample code for java.io.BufferedInputStream definition code for java.io.BufferedInputStream A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the input and to support the mark and reset methods.
BufferedOutputStream sample code for java.io.BufferedOutputStream definition code for java.io.BufferedOutputStream The class implements a buffered output stream.
BufferedReader sample code for java.io.BufferedReader definition code for java.io.BufferedReader Read text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.
BufferedWriter sample code for java.io.BufferedWriter definition code for java.io.BufferedWriter Write text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings.
ByteArrayInputStream sample code for java.io.ByteArrayInputStream definition code for java.io.ByteArrayInputStream A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream.
ByteArrayOutputStream sample code for java.io.ByteArrayOutputStream definition code for java.io.ByteArrayOutputStream This class implements an output stream in which the data is written into a byte array.
CharArrayReader sample code for java.io.CharArrayReader definition code for java.io.CharArrayReader This class implements a character buffer that can be used as a character-input stream.
CharArrayWriter sample code for java.io.CharArrayWriter definition code for java.io.CharArrayWriter This class implements a character buffer that can be used as an Writer.
DataInputStream sample code for java.io.DataInputStream definition code for java.io.DataInputStream A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.
DataOutputStream sample code for java.io.DataOutputStream definition code for java.io.DataOutputStream A data output stream lets an application write primitive Java data types to an output stream in a portable way.
File sample code for java.io.File definition code for java.io.File An abstract representation of file and directory pathnames.
FileDescriptor sample code for java.io.FileDescriptor definition code for java.io.FileDescriptor Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes.
FileInputStream sample code for java.io.FileInputStream definition code for java.io.FileInputStream A FileInputStream obtains input bytes from a file in a file system.
FileOutputStream sample code for java.io.FileOutputStream definition code for java.io.FileOutputStream A file output stream is an output stream for writing data to a File or to a FileDescriptor.
FilePermission sample code for java.io.FilePermission definition code for java.io.FilePermission This class represents access to a file or directory.
FileReader sample code for java.io.FileReader definition code for java.io.FileReader Convenience class for reading character files.
FileWriter sample code for java.io.FileWriter definition code for java.io.FileWriter Convenience class for writing character files.
FilterInputStream sample code for java.io.FilterInputStream definition code for java.io.FilterInputStream A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
FilterOutputStream sample code for java.io.FilterOutputStream definition code for java.io.FilterOutputStream This class is the superclass of all classes that filter output streams.
FilterReader sample code for java.io.FilterReader definition code for java.io.FilterReader Abstract class for reading filtered character streams.
FilterWriter sample code for java.io.FilterWriter definition code for java.io.FilterWriter Abstract class for writing filtered character streams.
InputStream sample code for java.io.InputStream definition code for java.io.InputStream This abstract class is the superclass of all classes representing an input stream of bytes.
InputStreamReader sample code for java.io.InputStreamReader definition code for java.io.InputStreamReader An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset sample code for java.nio.charset.Charset definition code for java.nio.charset.Charset .
LineNumberInputStream sample code for java.io.LineNumberInputStream definition code for java.io.LineNumberInputStream Deprecated. This class incorrectly assumes that bytes adequately represent characters.
LineNumberReader sample code for java.io.LineNumberReader definition code for java.io.LineNumberReader A buffered character-input stream that keeps track of line numbers.
ObjectInputStream sample code for java.io.ObjectInputStream definition code for java.io.ObjectInputStream An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.
ObjectInputStream.GetField sample code for java.io.ObjectInputStream.GetField definition code for java.io.ObjectInputStream.GetField Provide access to the persistent fields read from the input stream.
ObjectOutputStream sample code for java.io.ObjectOutputStream definition code for java.io.ObjectOutputStream An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.
ObjectOutputStream.PutField sample code for java.io.ObjectOutputStream.PutField definition code for java.io.ObjectOutputStream.PutField Provide programmatic access to the persistent fields to be written to ObjectOutput.
ObjectStreamClass sample code for java.io.ObjectStreamClass definition code for java.io.ObjectStreamClass Serialization's descriptor for classes.
ObjectStreamField sample code for java.io.ObjectStreamField definition code for java.io.ObjectStreamField A description of a Serializable field from a Serializable class.
OutputStream sample code for java.io.OutputStream definition code for java.io.OutputStream This abstract class is the superclass of all classes representing an output stream of bytes.
OutputStreamWriter sample code for java.io.OutputStreamWriter definition code for java.io.OutputStreamWriter An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are encoded into bytes using a specified charset sample code for java.nio.charset.Charset definition code for java.nio.charset.Charset .
PipedInputStream sample code for java.io.PipedInputStream definition code for java.io.PipedInputStream A piped input stream should be connected to a piped output stream; the piped input stream then provides whatever data bytes are written to the piped output stream.
PipedOutputStream sample code for java.io.PipedOutputStream definition code for java.io.PipedOutputStream A piped output stream can be connected to a piped input stream to create a communications pipe.
PipedReader sample code for java.io.PipedReader definition code for java.io.PipedReader Piped character-input streams.
PipedWriter sample code for java.io.PipedWriter definition code for java.io.PipedWriter Piped character-output streams.
PrintStream sample code for java.io.PrintStream definition code for java.io.PrintStream A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
PrintWriter sample code for java.io.PrintWriter definition code for java.io.PrintWriter Print formatted representations of objects to a text-output stream.
PushbackInputStream sample code for java.io.PushbackInputStream definition code for java.io.PushbackInputStream A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" one byte.
PushbackReader sample code for java.io.PushbackReader definition code for java.io.PushbackReader A character-stream reader that allows characters to be pushed back into the stream.
RandomAccessFile sample code for java.io.RandomAccessFile definition code for java.io.RandomAccessFile Instances of this class support both reading and writing to a random access file.
Reader sample code for java.io.Reader definition code for java.io.Reader Abstract class for reading character streams.
SequenceInputStream sample code for java.io.SequenceInputStream definition code for java.io.SequenceInputStream A SequenceInputStream represents the logical concatenation of other input streams.
SerializablePermission sample code for java.io.SerializablePermission definition code for java.io.SerializablePermission This class is for Serializable permissions.
StreamTokenizer sample code for java.io.StreamTokenizer definition code for java.io.StreamTokenizer The StreamTokenizer class takes an input stream and parses it into "tokens", allowing the tokens to be read one at a time.
StringBufferInputStream sample code for java.io.StringBufferInputStream definition code for java.io.StringBufferInputStream Deprecated. This class does not properly convert characters into bytes.
StringReader sample code for java.io.StringReader definition code for java.io.StringReader A character stream whose source is a string.
StringWriter sample code for java.io.StringWriter definition code for java.io.StringWriter A character stream that collects its output in a string buffer, which can then be used to construct a string.
Writer sample code for java.io.Writer definition code for java.io.Writer Abstract class for writing to character streams.
 

Exception Summary
CharConversionException sample code for java.io.CharConversionException definition code for java.io.CharConversionException Base class for character conversion exceptions.
EOFException sample code for java.io.EOFException definition code for java.io.EOFException Signals that an end of file or end of stream has been reached unexpectedly during input.
FileNotFoundException sample code for java.io.FileNotFoundException definition code for java.io.FileNotFoundException Signals that an attempt to open the file denoted by a specified pathname has failed.
InterruptedIOException sample code for java.io.InterruptedIOException definition code for java.io.InterruptedIOException Signals that an I/O operation has been interrupted.
InvalidClassException sample code for java.io.InvalidClassException definition code for java.io.InvalidClassException Thrown when the Serialization runtime detects one of the following problems with a Class.
InvalidObjectException sample code for java.io.InvalidObjectException definition code for java.io.InvalidObjectException Indicates that one or more deserialized objects failed validation tests.
IOException sample code for java.io.IOException definition code for java.io.IOException Signals that an I/O exception of some sort has occurred.
NotActiveException sample code for java.io.NotActiveException definition code for java.io.NotActiveException Thrown when serialization or deserialization is not active.
NotSerializableException sample code for java.io.NotSerializableException definition code for java.io.NotSerializableException Thrown when an instance is required to have a Serializable interface.
ObjectStreamException sample code for java.io.ObjectStreamException definition code for java.io.ObjectStreamException Superclass of all exceptions specific to Object Stream classes.
OptionalDataException sample code for java.io.OptionalDataException definition code for java.io.OptionalDataException Exception indicating the failure of an object read operation due to unread primitive data, or the end of data belonging to a serialized object in the stream.
StreamCorruptedException sample code for java.io.StreamCorruptedException definition code for java.io.StreamCorruptedException Thrown when control information that was read from an object stream violates internal consistency checks.
SyncFailedException sample code for java.io.SyncFailedException definition code for java.io.SyncFailedException Signals that a sync operation has failed.
UnsupportedEncodingException sample code for java.io.UnsupportedEncodingException definition code for java.io.UnsupportedEncodingException The Character Encoding is not supported.
UTFDataFormatException sample code for java.io.UTFDataFormatException definition code for java.io.UTFDataFormatException Signals that a malformed string in modified UTF-8 format has been read in a data input stream or by any class that implements the data input interface.
WriteAbortedException sample code for java.io.WriteAbortedException definition code for java.io.WriteAbortedException Signals that one of the ObjectStreamExceptions was thrown during a write operation.