|
Answer» The InputStream is an abstract class of the java.io package. It is the PARENT class of all the subclasses related to input in the form of sequence of bytes. - FileInputStream consists of input bytes from a file.
- ByteArrayInputStream reads the next byte of data from the input STREAM.
- FilterInputStream returns the APPROXIMATE number of bytes that can be read from the input stream. It consists of the DataInputStream, BufferedInputStream and PushBackInputStream classes.
- PipedInputStream can be used to read data and is PIPED with PipedOutputStream. A pipe is said to be a link between TWO threads running in JVM simultaneously.
- ObjectInputStream is used to deserialize primitive data types and objects previously written by the ObjectOutputStream.
The OutputStream is an abstract class of the java.io package. It is the parent all the subclasses related to input in the form of sequence of bytes. - FileOutputStream is a output stream used for writing data into a file.
- ByteArrayOutputStream allows us to seize data written to a stream in an array.
- FilterOutputStream is the parent class of all those classes which filter output streams. It is extended by many subclasses including DataOutputStream, BufferedOutputStream and PrintStream.
- PipedOutputStream is piped with the PipedInputStream.
- ObjectOutputStream writes primitive objects, data types and graphs to the OutputStream.
|