Classes and Interfaces of Java I/O Streams
The java.io package contains a number of classes, interfaces and exceptions. They will be needed in program development related to Java I/O and File operations. Their descriptions are given below.
Java I/O Classes
The following listings of classes of java.io package shown in the table:
It used for creating an internal buffer array. It supports the mark and reset methods.
This class used for writes byte to output stream. It implements a buffered output stream.
This class provides read text from character input stream and buffering characters. It also reads characters, arrays and lines.
This class provides write text from character output stream and buffering characters. It also writes characters, arrays and lines.
It contains the internal buffer and reads data from the stream.
This class used for data is written into byte array. This is implemented in output stream class.
It used for char input stream and implements a character buffer.
This class also implements a character buffer and it uses a writer.
This class reads the primitive data types from the input stream in a machine format.
This class writes the primitive data types from the output stream in machine format.
This class shows a file and directory pathnames.
This class uses for create a FileInputStream and FileOutputStream.
It contains the input byte from a file and implements an input stream.
It uses for writing data to a file and also implements an output stream.
It provides the permission to access a file or directory.
This class used for reading characters file.
This class used for writing characters files.
This class overrides all methods of InputStream and contains some other input stream.
This class overrides all methods of OutputStream and contains some other output stream.
It reads the data from the filtered character stream.
It writes data from the filtered character stream.
This class represents an input stream of bytes.
It reads bytes and decodes them into characters.
This class has a line numbers
This class used for recover the object to serialize previously.
This class access to president fields read form input stream.
This class is used for write the primitive data types and also write the object to read by the ObjectInputStream.
This class access to president fields write in to ObjectOutput.
Serialization’s descriptor for classes.
This class describes the serializable field.
This class represents an output stream of bytes.
It writes bytes and decodes them into characters.
In this class the data bytes are written into piped output stream. This class also connected into a piped output stream.
This class also communicates the piped input stream into piped output stream. It creates communication between both.
It is a piped character-input stream.
It is a piped character-output stream.
This class adds the functionality of another output stream.
This class adds the functionality of another input stream.
It also include the another function of input stream. Such as: “push back” or “unread” one byte.
This is a character stream reader and reads the data push back into the stream.
It supports both reading and writing to a random access file.
It is used for reading character stream.
It represents the logical concatenation of other input stream.
This is a serializable permission class.
It takes an input stream and parses it into “tokens”. The token to be allowed at the read time.
This is a character string class. It has character read source.
This is also a character string class. It uses to shows the output in the buffer.
It is used for writing to character stream.
The Interfaces provided by the java.io package shown in the table below:
This interface can be used for reading byte stream and reconstructing the java primitive data types.
This interface can be used for writing the byte stream and converting data from the java primitive data types.
This is written in Serializable Stream. It saves and stores its contents.
It can be used for Filtering the Pathnames.
This interface used for Filter the Filenames.
This interface used for reading of objects and it extends the DataInput interface.
This is a Callback interface. It allows the validation of objects within a graph.
This interface used for writing of objects and it extends the DataOutput interface.
This interface used for Constants writing into Serialization Objects Stream.
This interface implementing in the java.io.Serializable interface.
The exception classes of the java.io package shown in the table below:
It provides detail message in the catch block to associated with the CharConversionException
This exception indicates the end of file. When the file input stream to be end then EOFException to be occuted.
When the open file’s pathname does not find then this exception to be occured.
When the I/O operations to interrupt from any causes then it becomes.
Any problems to be created with class, when the Serializing runtime to be detected.
When the de-serialized objects failed then it occurs.
When the I/O operations to be failed then it occurs.
The Serialization or deserialization operations are not active then it occurs.
This exception when the instance is required to a Serializable interface.
This is a supper class of all exception class. It is used for specific to Object Stream Classes.
When the reading data operations to fail then it these exception occurs. It is belonging to the serialized object
It thrown when the control information that was read form an object stream violates internal consistency checks.
The sync operation is failed then SyncFaieldException to be occurred.
The Character Encoding is not supported.
A malformed UTF-8 has been read in a data input stream, it implemented by data input interface.
In this exception to be thrown by the ObjectStreamException during a write operating.
In the next section we will describe about Java Standard Streams.