go to previous page   go to home page   go to next page        


Internet data looks like an IO stream.

IO Streams

The core Java language does not have any IO methods. For a program to do IO, it must import an IO package. These notes (and most programs) use the package java.io.

Data for a program may come from several sources. Data created by a program may be sent to several destinations. The connection between a program and a data source or destination is called a stream. An input stream handles data flowing into a program. An output stream handles data flowing out of a program.

streams entering and leaving a program

In the picture, each "O" is a piece of data. The data are streaming from the source into the program, and streaming from the program to the destination.


Could a stream connect two programs?