Chapter 15, “The java.io Package”

Java input and output are based on the use of streams, which are sequences of bytes or characters that travel from a source to a destination over a communication path.

Java defines two major classes of byte streams: InputStream and OutputStream. These streams are subclassed to provide a variety of I/O capabilities.

Java 1.1 introduced the Reader and Writer classes to provide the foundation for 16-bit Unicode character-oriented I/O. These classes support internationalization of Java I/O, allowing text to be stored using international character encodings. This support has continued in all subsequent versions of Java.

The File class is used to access the files and directories of the local file system.

The RandomAccessFile ...

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams 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.