March 2014
Intermediate to advanced
1200 pages
31h 17m
English
Working with Streams
Along with File and RandomAccessFile, Java uses streams to perform I/O operations. A stream is an ordered sequence of bytes of arbitrary length. Bytes flow over an output stream from an application to a destination and flow over an input stream from a source to an application. Figure 11-2 illustrates these flows.

Figure 11-2. Conceptualizing output and input streams as flows of bytes
Note Java’s use of the word stream is analogous to stream of water, stream of electrons, and so on.
Java recognizes various stream destinations, such as byte arrays, files, screens, sockets (network endpoints), and thread pipes. Java also ...
Read now
Unlock full access