In the last several modules, we treated streams as sequences of raw bytes with no particular meaning.
Generally this is not perfectly true. The bytes sent over a stream have meanings. Sometimes they mean letters like
A or
B.
Other times they mean numbers like 1,024 or 3.141529.
It is not difficult to write code that converts an appropriate number of bytes into an integer, a floating point number, or a Unicode character. Nonetheless, doing so is so common that the class library includes classes that perform these conversions in the
java.io package.
There are two kinds of interpreter classes in the
java.io package:
- filter streams
- readers and writers