Any software system has to receive and produce some kind of data that can be organized as a set of isolated inputs/outputs or as a stream of data. A stream can be limited or endless. A program can read from a stream (then it is called an input stream), or write to a stream (then it is called an output stream). The Java I/O stream is either byte-based or character-based, meaning that its data is interpreted either as raw bytes or as characters.
The java.io package contains classes that support many, but not all, possible data sources. It is built for the most part around the input from and to files, network streams, and internal memory buffers. It does not contain many classes necessary for network communication. They belong to the java.net, javax.net, and other packages of Java Networking API. Only after the networking source or destination is established (a network...