Lecture overview -- Keyboard shortcut: 'u'  Previous page: The Stream Concept -- Keyboard shortcut: 'p'  Next page: The most important members in class Stream -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 3 : 40
Object-oriented Programming in C#
Input and Output Classes
The abstract class Stream in C#

The abstract class Stream is the most general stream class in C#

  • The Stream class

    • Provides a generic view on data sources and data destinations

    • Isolates the programmer from operating system details

    • Offers reading and writing of raw, binary data

      • Chunked and sequenced as bytes

      • No char encoding is involved

    • Synchronous reading and writing

      • Read and Write transfer byte arrays

      • A subclass must implement the operations Read and Write

    • Asynchronous reading and writing - (not covered in this lecture)

      • BeginRead and EndRead

      • BeginWrite and EndWrite

      • Rely on Read and Write

    • A stream can be queried for its capabilities

      • CanRead, CanWrite, CanSeek