Data File - Stream

A stream is a sequence of bytes. A stream is a general name given to a flow of data. Different streams are used to represent different kinds of data flow. Each stream is associated with a particular class,which contains member functions and definitions for dealing with that particular kind of data flow. The stream that supplies data to the program in known as input stream. It reads the data from the file and hands it over to the program. The stream that receives data from the program is known as output stream. It writes the received data to the file.Following figure illustrates it.

When the main function of your program is invoked, it already has three predefined streams open and available for use. These represent the "standard" input and output channels that have been established for the process.

Read more about this topic:  Data File

Famous quotes containing the word stream:

    The habit some writers indulge in of perpetual quotation is one it behoves lovers of good literature to protest against, for it is an insidious habit which in the end must cloud the stream of thought, or at least check spontaneity. If it be true that le style c’est l’homme, what is likely to happen if l’homme is for ever eking out his own personality with that of some other individual?
    Dame Ethel Smyth (1858–1944)

    To me heaven would be a big bull ring with me holding two barrera seats and a trout stream outside that no one else was allowed to fish in and two lovely houses in the town; one where I would have my wife and children and be monogamous and love them truly and well and the other where I would have my nine beautiful mistresses on nine different floors.
    Ernest Hemingway (1899–1961)

    This pond never breaks up so soon as the others in this neighborhood, on account both of its greater depth and its having no stream passing through it to melt or wear away the ice.... It indicates better than any water hereabouts the absolute progress of the season, being least affected by transient changes of temperature. A severe cold of a few days’ duration in March may very much retard the opening of the former ponds, while the temperature of Walden increases almost uninterruptedly.
    Henry David Thoreau (1817–1862)