O'Reilly logo

Oracle Certified Professional Java SE 8 Programmer Exam 1Z0-809: A Comprehensive OCPJP 8 Certification Guide by Tushar Sharma, Hari Kiran, S G Ganesh

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 10

image

Java File I/O (NIO.2)

Certification Objectives

Use Path interface to operate on file and directory paths

Use Files class to check, read, delete, copy, move, manage metadata of a file or directory

Use Stream API with NIO.2

Java offers a rich set of APIs you can use to manipulate files and directories. Java 7 introduced a set of I/O APIs called NIO.2 that offered convenient ways to perform operations related to a file system. In Java 8, you can use the Stream API (discussed in Chapter 6) with NIO.2.

The previous chapter covered I/O fundamentals; you learned how to read and write from the console and how to use streams to read and write ...

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