O'Reilly logo

Windows Runtime via C# by Jeffrey Richter and Maarten van de Bospoort

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Stream input and output

In Chapter 5 I explained how your app could navigate various storage folders to manipulate files. However, I did not explain how to access the contents of the files. In this chapter, you’ll learn how to transfer data to and from files using stream input and output. However, streams are not just for files; you can use them as a general-access mechanism to transfer data. For example, you also use streams to transfer data over sockets. (See Chapter 7.) Streams are also used to manipulate in-memory data, as I’ll show later in this chapter’s “Compressing and decompressing data” and Encrypting and decrypting data sections.

Simple file I/O

Before diving into streams, I want to show some WinRT APIs that simplify reading ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required