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:

    A self is, by its very essence, a being with a past. One must look lengthwise backwards in the stream of time in order to see the self, or its shadow, now moving with the stream, now eddying in the currents from bank to bank of its channel, and now strenuously straining onwards in the pursuit of its chosen good.
    Josiah Royce (1855–1916)

    Physical force has no value, where there is nothing else. Snow in snow-banks, fire in volcanoes and solfataras is cheap. The luxury of ice is in tropical countries, and midsummer days. The luxury of fire is, to have a little on our hearth; and of electricity, not the volleys of the charged cloud, but the manageable stream on the battery-wires. So of spirit, or energy; the rests or remains of it in the civil and moral man, are worth all the cannibals in the Pacific.
    Ralph Waldo Emerson (1803–1882)

    The small force that it takes to launch a boat into the stream should not be confused with the force of the stream that carries it along: but this confusion appears in nearly all biographies.
    Friedrich Nietzsche (1844–1900)