Chapter 2Managed I/O - Streams, Readers, and Writers
|
||
|
What do we have in this chapter?
Stream TypesStream ClassBasic OperationsCommon PropertiesSynchronous and Asynchronous I/OBase StreamsFile StreamCreating or Opening a FileC# Example: FileStreamVB .NET Example: FileStreamAnother C++ Example: FileStreamAnother C# Example: FileStreamAnother VB .NET Example: FileStreamClosing a FileC++ Program Example: Writing and reading text – StreamWriter and StreamReaderC# Program Example: Writing and reading text – StreamWriter and StreamReaderC++ Program Example: Writing and Reading Binary – BinaryWriter and BinaryReaderC# Program Example: Writing and Reading Binary – BinaryWriter and BinaryReaderVB .NET Program Example: Writing and Reading Binary – BinaryWriter and BinaryReaderCreating a Memory StreamC++ Program Example: MemoryStreamC# Program Example: MemoryStreamHandling Memory Stream I/ONetwork StreamCreating a Network StreamHandling Network I/OC# NetworkStream Program Example – Receiver ProgramVB .NET NetworkStream Program Example – Receiver ProgramC# NetworkStream Program Example – Sender ProgramVB .NET NetworkStream Program Example – Sender ProgramBufferedStream ClassC++ BufferedStream Program ExampleC# BufferedStream Program ExampleVB .NET BufferedStream Program ExampleC++ CryptoStream Program ExampleC# CryptoStream Program ExampleVB .NET CryptoStream Program ExampleC++ SSLStream Server Program ExampleC# SSLStream Server Program ExampleC# SSLStream Client Program ExampleC++ NegotiateStream Server Program ExampleC# NegotiateStream Server Program ExampleC# NegotiateStream Client Program ExampleReaders and Writers
StreamReader and StreamWriterC++ StreamWriter and StreamReader Program ExampleC# StreamWriter and StreamReader Program ExampleVB .NET StreamWriter and StreamReader Program ExampleC# StreamReader and StreamWriter Program ExampleVB .NET StreamReader and StreamWriter Program ExampleC++ BinaryReader and BinaryWriter Program ExampleC# BinaryReader and BinaryWriter Program ExampleVB .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. |
|
|
![]() 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 > |
||