Since: API Level 1
package

java.io

Classes | Description

Provides input and output facilities by means of streaming, file system access and serialization.

more...

Interfaces

Closeable Defines an interface for classes that can (or need to) be closed once they are not used any longer. 
DataInput Defines an interface for classes that are able to read typed data from some source. 
DataOutput Defines an interface for classes that are able to write typed data to some target. 
Externalizable Defines an interface for classes that want to be serializable, but have their own binary representation. 
FileFilter An interface for filtering File objects based on their names or other information. 
FilenameFilter An interface for filtering File objects based on their names or the directory they reside in. 
Flushable Defines an interface for classes that can (or need to) be flushed, typically before some output processing is considered to be finished and the object gets closed. 
ObjectInput Defines an interface for classes that allow reading serialized objects. 
ObjectInputValidation A callback interface for post-deserialization checks on objects. 
ObjectOutput Defines an interface for classes that allow reading serialized objects. 
ObjectStreamConstants A helper interface with constants used by the serialization implementation. 
Serializable An empty marker interface for classes that want to support serialization and deserialization based on the ObjectOutputStream and ObjectInputStream classes. 

Classes

BufferedInputStream Wraps an existing InputStream and buffers the input. 
BufferedOutputStream Wraps an existing OutputStream and buffers the output. 
BufferedReader Wraps an existing Reader and buffers the input. 
BufferedWriter Wraps an existing Writer and buffers the output. 
ByteArrayInputStream A specialized InputStream for reading the contents of a byte array. 
ByteArrayOutputStream A specialized OutputStream for class for writing content to an (internal) byte array. 
CharArrayReader A specialized Reader for reading the contents of a char array. 
CharArrayWriter A specialized Writer for class for writing content to an (internal) char array. 
DataInputStream Wraps an existing InputStream and reads typed data from it. 
DataOutputStream Wraps an existing OutputStream and writes typed data to it. 
File An "abstract" representation of a file system entity identified by a pathname. 
FileDescriptor The lowest-level representation of a file, device, or socket. 
FileInputStream A specialized InputStream that reads from a file in the file system. 
FileOutputStream A specialized OutputStream that writes to a file in the file system. 
FilePermission A permission for accessing a file or directory. 
FileReader A specialized Reader that reads from a file in the file system. 
FileWriter A specialized Writer that writes to a file in the file system. 
FilterInputStream Wraps an existing InputStream and performs some transformation on the input data while it is being read. 
FilterOutputStream Wraps an existing OutputStream and performs some transformation on the output data while it is being written. 
FilterReader Wraps an existing Reader and performs some transformation on the input data while it is being read. 
FilterWriter Wraps an existing Writer and performs some transformation on the output data while it is being written. 
InputStream The base class for all input streams. 
InputStreamReader A class for turning a byte stream into a character stream. 
LineNumberInputStream This class is deprecated. Use LineNumberReader  
LineNumberReader Wraps an existing Reader and counts the line terminators encountered while reading the data. 
ObjectInputStream A specialized InputStream that is able to read (deserialize) Java objects as well as primitive data types (int, byte, char etc.). 
ObjectInputStream.GetField GetField is an inner class that provides access to the persistent fields read from the source stream. 
ObjectOutputStream A specialized OutputStream that is able to write (serialize) Java objects as well as primitive data types (int, byte, char etc.). 
ObjectOutputStream.PutField PutField is an inner class to provide access to the persistent fields that are written to the target stream. 
ObjectStreamClass Represents a descriptor for identifying a class during serialization and deserialization. 
ObjectStreamField Describes a field for the purpose of serialization. 
OutputStream The base class for all output streams. 
OutputStreamWriter A class for turning a character stream into a byte stream. 
PipedInputStream Receives information from a communications pipe. 
PipedOutputStream Places information on a communications pipe. 
PipedReader Receives information on a communications pipe. 
PipedWriter Places information on a communications pipe. 
PrintStream Wraps an existing OutputStream and provides convenience methods for writing common data types in a human readable format. 
PrintWriter Wraps either an existing OutputStream or an existing Writer and provides convenience methods for printing common data types in a human readable format. 
PushbackInputStream Wraps an existing InputStream and adds functionality to "push back" bytes that have been read, so that they can be read again. 
PushbackReader Wraps an existing Reader and adds functionality to "push back" characters that have been read, so that they can be read again. 
RandomAccessFile Allows reading from and writing to a file in a random-access manner. 
Reader The base class for all readers. 
SequenceInputStream Concatenates two or more existing InputStreams. 
SerializablePermission Is used to enable access to potentially unsafe serialization operations. 
StreamTokenizer Parses a stream into a set of defined tokens, one at a time. 
StringBufferInputStream This class is deprecated. Use StringReader  
StringReader A specialized Reader that reads characters from a String in a sequential manner. 
StringWriter A specialized Writer that writes characters to a StringBuffer in a sequential manner, appending them in the process. 
Writer The base class for all writers. 

Exceptions

CharConversionException The top level class for character conversion exceptions. 
EOFException Thrown when a program encounters the end of a file or stream during an input operation. 
FileNotFoundException Thrown when a file specified by a program cannot be found. 
InterruptedIOException Signals that a blocking I/O operation has been interrupted. 
InvalidClassException Signals a problem during the serialization or or deserialization of an object. 
InvalidObjectException Signals that, during deserialization, the validation of an object has failed. 
IOException Signals a general, I/O-related error. 
NotActiveException Signals that a serialization-related method has been invoked in the wrong place. 
NotSerializableException Signals that an object that is not serializable has been passed into the ObjectOutput.writeObject() mthod. 
ObjectStreamException Signals some sort of problem during either serialization or deserialization of objects. 
OptionalDataException Signals that the ObjectInputStream class encountered a primitive type (int, char etc.) instead of an object instance in the input stream. 
StreamCorruptedException Signals that the readObject() method could not read an object due to missing information (for example, a cyclic reference that doesn't match a previous instance, or a missing class descriptor for the object to be loaded). 
SyncFailedException Signals that the sync() method has failed to complete. 
UnsupportedEncodingException Thrown when a program asks for a particular character converter that is unavailable. 
UTFDataFormatException Signals that an incorrectly encoded UTF-8 string has been encountered, most likely while reading some DataInputStream
WriteAbortedException Signals that the readObject() method has detected an exception marker in the input stream.