What Are Streams?

Most computer programs accept some form of input and generate some type of output. That is, after all, basically what a computer is useful for. Every computer language must have a way of dealing with input and output; otherwise, it would be impossible to write a useful program. The input could come from a file on disk, data sent over the network, or even another program. This is true of the output as well.

Most information used within a computer program flows from the input source through the computer program and then possibly on to an output destination. This idea of data flow leads to the term stream. A stream is nothing more than a flow of data through some channel. Input streams direct data from the outside world—a ...

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.