Chapter 2

Managed I/O - Streams, Readers, and Writers

 

 

 

 

 

COMPLETED PROJECT DOWNLOAD

What we have in this chapter?

  1. An Overview

  2. Stream Types

  3. Stream Class

  4. Basic Operations

  5. Common Properties

  6. Synchronous and Asynchronous I/O

  7. Base Streams

  8. File Stream

  9. Creating or Opening a File

  10. C++ Example: FileStream

  11. C# Example: FileStream

  12. VB .NET Example: FileStream

  13. Another C++ Example: FileStream

  14. Another C# Example: FileStream

  15. Another VB .NET Example: FileStream

  16. Reading or Writing to a File

  17. Closing a File

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

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

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

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

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

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

  24. Memory Stream

  25. Creating a Memory Stream

  26. C++ Program Example: MemoryStream

  27. C# Program Example: MemoryStream

  28. Handling Memory Stream I/O

  29. Network Stream

  30. Creating a Network Stream

  31. Handling Network I/O

  32. C++ NetworkStream Program Example – Receiver Program

  33. C# NetworkStream Program Example – Receiver Program

  34. VB .NET NetworkStream Program Example – Receiver Program

  35. C++ NetworkStream Program Example – Sender Program

  36. C# NetworkStream Program Example – Sender Program

  37. VB .NET NetworkStream Program Example – Sender Program

  38. Composable Streams

  39. BufferedStream Class

  40. C++ BufferedStream Program Example

  41. C# BufferedStream Program Example

  42. VB .NET BufferedStream Program Example

  43. CryptoStream Class

  44. C++ CryptoStream Program Example

  45. C# CryptoStream Program Example

  46. VB .NET CryptoStream Program Example

  47. SSLStream Class

  48. C++ SSLStream Server Program Example

  49. C# SSLStream Server Program Example

  50. C++ SSLStream Client Program Example

  51. C# SSLStream Client Program Example

  52. NegotiateStream Class

  53. C++ NegotiateStream Server Program Example

  54. C# NegotiateStream Server Program Example

  55. C++ NegotiateStream Client Program Example

  56. C# NegotiateStream Client Program Example

  57. AuthenticatedStream Class

  58. Readers and Writers

 

  1. StreamReader and StreamWriter

  2. C++ StreamWriter and StreamReader Program Example

  3. C# StreamWriter and StreamReader Program Example

  4. VB .NET StreamWriter and StreamReader Program Example

  5. C++ StreamReader and StreamWriter Program Example

  6. C# StreamReader and StreamWriter Program Example

  7. VB .NET StreamReader and StreamWriter Program Example

  8. BinaryReader and BinaryWriter

  9. C++ BinaryReader and BinaryWriter Program Example

  10. C# BinaryReader and BinaryWriter Program Example

  11. 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 >