Chapter    11

Performing Classic I/O

Applications often input data for processing and output processing results. Data is input from a file or some other source and is output to a file or some other destination. Java supports I/O via the classic I/O APIs located in the java.io package and the new I/O APIs located in java.nio and related subpackages (and java.util.regex). This chapter introduces you to the classic I/O APIs.

Note   You’ve already experienced classic I/O in the context of Chapter 1’s Standard I/O coverage, Chapter 8’s Process class, and Chapter 10’s ZIP and JAR APIs.

Working with the File API

Applications often interact with a filesystem , which is usually expressed as a hierarchy of files and directories starting from a root directory ...

Get Learn Java for Android Development, 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.