Saturday 3 October 2009

Streams and readers/writers

Finished chapter 2 in the 70-536 training kit book about IO (input/output)

I imagine things like this metaphor: imagine that you have an old tape recorder. You have you tapes and a machine to read it, and record it.

A tape is basically just a stream, which is ready to be read or written in a specific place. The same is the case with the streams in .NET. In the .NET framework is just nice enough to rewind the tapes every time you take out the tape from the machine.

A tape is best used with a reader/writer so to use the stream a reader is created, or to record something a writer is created.

Then there are different kinds of tapes, some are IsolatedFiles which can only be read by your machine.

No comments: