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:

    Ye gentle souls, who dream of rural ease,
    Whom the smooth stream and smoother sonnet please;
    Go! if the peaceful cot your praises share,
    Go, look within, and ask if peace be there:
    If peace be his—that drooping weary sire,
    Of theirs, that offspring round their feeble fire,
    Or hers, that matron pale, whose trembling hand
    Turns on the wretched hearth th’ expiring brand.
    George Crabbe (1754–1832)

    Once you get into this great stream of history you can’t get out. You can drown. Or you can be pulled ashore by the tide. But it is awfully hard to get out when you are in the middle of the stream—if it is intended that you stay there.
    Richard M. Nixon (1913–1995)

    One has but to observe a community of beavers at work in a stream to understand the loss in his sagacity, balance, co-operation, competence, and purpose which Man has suffered since he rose up on his hind legs.... He began to chatter and he developed Reason, Thought, and Imagination, qualities which would get the smartest group of rabbits or orioles in the world into inextricable trouble overnight.
    James Thurber (1894–1961)