Chapter 2

Managed I/O - Streams, Readers, and Writers

 

 

 

 

 

 

COMPLETED PROJECT DOWNLOAD

 

 

 

What do we have in this chapter?

  1. An Overview

  2. Stream Types

    Stream Class

    Basic Operations

    Common Properties

    Synchronous and Asynchronous I/O

    Base Streams

    File Stream

    Creating or Opening a File

  3. C++ Example: FileStream

  4. C# Example: FileStream

    VB .NET Example: FileStream

    Another C++ Example: FileStream

    Another C# Example: FileStream

    Another VB .NET Example: FileStream

  5. Reading or Writing to a File

  6. Closing a File

    C++ Program Example: Writing and reading text – StreamWriter and StreamReader

    C# Program Example: Writing and reading text – StreamWriter and StreamReader

  7. VB .NET Program Example – Writing and Reading Text File – StreamWriter and StreamReader

  8. C++ Program Example: Writing and Reading Binary – BinaryWriter and BinaryReader

    C# Program Example: Writing and Reading Binary – BinaryWriter and BinaryReader

    VB .NET Program Example: Writing and Reading Binary – BinaryWriter and BinaryReader

  9. Memory Stream

  10. Creating a Memory Stream

    C++ Program Example: MemoryStream

    C# Program Example: MemoryStream

    Handling Memory Stream I/O

    Network Stream

    Creating a Network Stream

    Handling Network I/O

  11. C++ NetworkStream Program Example – Receiver Program

  12. C# NetworkStream Program Example – Receiver Program

    VB .NET NetworkStream Program Example – Receiver Program

  13. C++ NetworkStream Program Example – Sender Program

  14. C# NetworkStream Program Example – Sender Program

    VB .NET NetworkStream Program Example – Sender Program

  15. Composable Streams

  16. BufferedStream Class

    C++ BufferedStream Program Example

    C# BufferedStream Program Example

    VB .NET BufferedStream Program Example

  17. CryptoStream Class

  18. C++ CryptoStream Program Example

    C# CryptoStream Program Example

    VB .NET CryptoStream Program Example

  19. SSLStream Class

  20. C++ SSLStream Server Program Example

    C# SSLStream Server Program Example

  21. C++ SSLStream Client Program Example

  22. C# SSLStream Client Program Example

  23. NegotiateStream Class

  24. C++ NegotiateStream Server Program Example

    C# NegotiateStream Server Program Example

  25. C++ NegotiateStream Client Program Example

  26. C# NegotiateStream Client Program Example

  27. AuthenticatedStream Class

  28. Readers and Writers

    StreamReader and StreamWriter

    C++ StreamWriter and StreamReader Program Example

    C# StreamWriter and StreamReader Program Example

    VB .NET StreamWriter and StreamReader Program Example

  1. C++ StreamReader and StreamWriter Program Example

  2. C# StreamReader and StreamWriter Program Example

    VB .NET StreamReader and StreamWriter Program Example

  3. BinaryReader and BinaryWriter

  4. C++ BinaryReader and BinaryWriter Program Example

    C# BinaryReader and BinaryWriter Program Example

    VB .NET BinaryReader and BinaryWriter Program Example

 

Note: If you want to experience a complete C++ .NET/C++-CLI programming tutorial please jump to Visual C++ .NET programming tutorial.

 

 

Summary

 

Streams provide a common and very simple way to perform I/O on operating system resources in the .NET Framework. It doesn’t matter if you’re writing to a network or a file; the I/O technique is fundamentally the same. In addition, you can layer a stream on top of another stream to make I/O operations even more powerful. Our discussions will describe streams using the synchronous I/O patterns in which calls to perform I/O will block until the I/O operation is complete. In the next chapter, we’ll present threading and the asynchronous pattern in the .NET Framework. We’ll show you how to perform I/O operations asynchronously that will enable you to develop greater, more flexible applications.

 

 

 

 

 

HOME

 

Custom Search

 < Network Programming & .NET Framework | Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7 | Part 8 | Part 9 | Part 10 | Part 11 | Part 12 | Part 13 | Part 14 | Part 15 | Part 16 | Threading and the Asynchronous Pattern >