Skip to Main Content
The Well-Grounded Java Developer
book

The Well-Grounded Java Developer

by Benjamin Evans, Martijn Verburg
July 2012
Intermediate to advanced content levelIntermediate to advanced
496 pages
16h 42m
English
Manning Publications
Content preview from The Well-Grounded Java Developer

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Performance and Instrumentation for the Well-Grounded Java Developer

Java Performance and Instrumentation for the Well-Grounded Java Developer

Benjamin J. Evans
Java By Comparison

Java By Comparison

Simon Harrer, Linus Dietz, Jörg Lenhard
DevOps Tools for Java Developers

DevOps Tools for Java Developers

Stephen Chin, Melissa McKay, Ixchel Ruiz, Baruch Sadogursky
Optimizing Java

Optimizing Java

Benjamin J. Evans, James Gough, Chris Newland

Publisher Resources

ISBN: 9781617290060Publisher SupportOtherPublisher WebsiteErrata PageSupplemental ContentPurchase Link