Home Segments Top Top Previous Next

473: Mainline

To create a file input stream connected to a file, you use an expression that creates an instance of the FileInputStream class for a specified file.

The following is an example in which the file specification happens to be "input.data", and the file input stream is assigned to stream:

                          File specification --* 
                                               v 
                                             ------------ 
FileInputStream stream = new FileInputStream("input.data");