File Operations Basics
This part covers the writing and reading of files. It explains the difference between small files that you can load in memory, and large files that you need to access through buffers. It shows you how you can use the decorator pattern to add features to basic file access.
-
Releasing Resources and Catching Exceptions
Accessing files or file systems comes with two constraints. First you need to properly release the system resources you opened, and second you need to manage exceptions. This section shows you how the patterns you should use for that.
-
Reading and Writing Small Files
This section discusses the details of reading, writing, creating, and opening files.
-
Reading and Writing Text Files
This section discusses the details of reading and writing text files using buffered I/O streams.
-
Reading and Writing Binary Files
This section discusses the details of reading, writing, creating, and opening files.
-
Decorating IO Streams
Using decoration to enhance the capabilities of IO streams.
-
In Memory IO Streams
Setting up character or binary streams on in-memory structures.