C H A P T E R  1

Image

Working with the Path Class

The recommended entry point to start exploring the NIO.2 API, also known as “JSR 203: More New I/O APIs for the Java Platform” (NIO.2), is the new abstract class java.nio.file.Path. This class is a milestone of NIO.2, and every application that involves I/O operations will exploit the powerful facilities of this class. Practically, it is the most commonly used class of NIO.2, since many I/O operations are based on a Path resource.

The Path class supports two types of operations: syntactic operations (almost any operation that involves manipulating paths without accessing the file system; these are ...

Get Pro Java 7 NIO.2 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.