Java Reference
In-Depth Information
Figure 8-2. Conceptualizing output and input streams as flows.
Note Java'suseof stream isanalogoustosaying“streamofwater”,“streamofelec-
trons”, and so on.
Javarecognizesvariousstreamdestinations;forexample,bytearrays,files,screens,
and sockets (networkendpoints).Javaalsorecognizesvariousstreamsources.Examples
include byte arrays, files, keyboards, and sockets. (I discuss sockets in Chapter 9 . )
Stream Classes Overview
The java.io packageprovidesseveraloutputstreamandinputstreamclassesthatare
descendents of the abstract OutputStream and InputStream classes. Figure 8-3
reveals the hierarchy of output stream classes.
Figure 8-3. All output stream classes except for PrintStream are denoted by their Out-
putStream suffixes.
Figure 8-4 reveals the hierarchy of input stream classes.
Search WWH ::




Custom Search