19.4 Base Classes for Input/Output
Different classes for reading and writing binary and character data are collected in the java.io package. For byte-oriented processing beyond text document, such as processing for PDF or MP3 files, other classes can work with HTML documents and configuration files. Separating binary data from character data is useful because, for example, when reading text files, they must always be converted to Unicode since Java internally encodes all characters in Unicode.
The stream classes from the java.io package are built around three central principles:
-
Some abstract base classes prescribe operations for inputs/outputs.
-
These abstract base classes exist once for Unicode characters and once for bytes.
-
The implementations ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access