Chapter 12. Streams and Files

In this chapter, we cover the methods for handling files and directories as well as the methods for actually writing and reading data. This chapter also shows you the object serialization mechanism that lets you store objects as easily as you can store text or numeric data. Next, we turn to several improvements that were made in the “new I/O” package java.nio, introduced in JDK 1.4 We finish the chapter with a discussion of regular expressions, even though they are not actually related to streams and files. We couldn’t find a better place to handle that topic, and apparently neither could the Java team—the ...

Get Core Java™ 2 Volume I - Fundamentals, Seventh 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.