Stream classes are byte-oriented classes, that mean all InputStream
classes (Buffered and non-buffered) read data byte by byte from stream and all OutputStream
(Buffered and non-buffered) classes writes data byte by byte to the stream. Stream classes are useful when you have small data or if you are dealing with binary files like images.
On the other handReader/Writer
are character based classes. These classes read or write one character at time from or into stream. These classes extends either java.io.Reader
(all character input classes) or java.io.Writer
(all character output classes). These classes are useful if you are dealing with text file or other textual stream. These classes are also Buffered
and Non-Buffered
.