Chapter 15. Files and Streams

Files offer long-term persistence of data items. Streams serve as conduits by which data items flow between programs, files, and other entities. Sometimes, a program must have its execution state (as represented by objects) frozen, through a process known as object serialization. At a later point in time, frozen objects are reconstructed through deserialization, and the program resumes its execution from the moment it froze. Finally, certain kinds of programs (such as compilers) need to break a stream of characters into tokens. Stream tokenizers accomplish that task. All of those concepts are explored in this chapter.

NOTE

Among the more anticipated features in version 1.4 of Java 2 Standard Edition are the new I/O ...

Get Java™ 2 by Example, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.