There are 2 types of Io stream
1. byte streams that are subclasses of inputstream or outputstream
2. Character streams that are subclasses of reader and writer
Inputstream/outputstream and Reader/writer are abstract class
Their class hierarchy is show:
-- Constructor functions --
Fileinputstream (File file)
Fileinputstream (filedescriptor fdobj)
Fileinputstream (string name)
Fileinputstream is meant for reading streams of raw bytes such as image data. For reading streams of characters, consider using filereader.
-- Constructor functions --
Bufferedinputstream (inputstream in)
Bufferedinputstream (inputstream in, int size)
-- Constructor functions --
Bufferedreader (Reader in)
Bufferedreader (Reader in, int sz)
-- Constructor functions --
Inputstreamreader (inputstream in)
Inputstreamreader (inputstream in, charset CS)
Inputstreamreader (inputstream in, charsetdecoder dec)
Inputstreamreader (inputstream in, string charsetname)
An inputstreamreader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. the charset that it uses may be specified by name or may be given explicitly, or the platform's default charset
May be accepted.
-- Constructor functions --
Filereader (File file)
Filereader (filedescriptor FD)
Filereader (string filename)