O'Reilly logo

The Well-Grounded Java Developer: Vital techniques of Java 7 and polyglot programming by Benjamin J. Evans and Martijn Verburg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. New I/O

This chapter covers

  • The new Java 7 I/O APIs (aka NIO.2)
  • Path—the new foundation for file- and directory-based I/O
  • The Files utility class and its various helper methods
  • How to solve common I/O use cases
  • An introduction to asynchronous I/O

One of the larger API changes in the Java language—a major update to the set of I/O APIs, called “more New I/O” or NIO.2 (aka JSR-203)—is the focus of this chapter. NIO.2 is a set of new classes and methods, that primarily live in the java.nio package.

  • It’s an out-and-out replacement of java.io.File for writing code that interacts with the filesystem.
  • It contains new asynchronous classes that will allow you to perform file and network I/O operations in a background thread without ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required