-
Course
- Core Tech
Java 8 Fundamentals: NIO and NIO2
Java NIO and NIO2 are two evolutions of the Java I/O API. It does not make Java I/O obsolete in any way, but merely bring more functionalities, leveraging the capabilities of file systems, not used by Java I/O.
What you'll learn
Java NIO and NIO2 have been added to the JDK to add more functionalities offered by the file systems that aren't used by Java I/O. In this course, Java 8 Fundamentals: NIO and NIO2, you'll learn how to use Java NIO to read and write data efficiently in bulk mode, and asynchronously to handle more operations simultaneously. First, you'll explore the fundamental objects of this API, including Buffer, Channel, and Selector to precisely set up performant I/O applications for disk or network access. Next, you'll discover how to efficiently navigate through very large directory structures, and how to trigger actions on directory events plugged on the native capabilities of the file systems for better performance. Finally, you'll delve into all of these APIs in action in extended live coding sessions, showing you how to properly use the patterns and how to deal with errors. By the end of this course, you'll have the necessary knowledge to design and create robust and performant I/O systems by following the right patterns, whether you want to access file systems or networks.
Table of contents
- Version Check | 15s
- Introducing NIO and NIO2 APIs: What Are You Going to Learn? | 2m 46s
- What Do You Need to Know to Follow This Course? | 1m 29s
- Agenda and Organization of This Course | 1m 5s
- Agenda and Organization of This Module | 46s
- Introducing the Java NIO API: Why It's Been Added to the JDK? | 2m 51s
- Understanding What NIO Provides That Is Missing in Java I/O | 1m 58s
- Introducing Buffers, Channels, and Selectors | 2m 42s
- Understanding Channels and In-memory File Channels | 2m 31s
- Understanding Buffers and Their Main Properties | 4m 3s
- Writing Content to a File Using Buffers and Channels | 2m 51s
- Reading Content from a File Using the Flip Operation | 3m 44s
- Understanding the Pattern to Read the Content of a File | 1m 28s
- Understanding Scattering Read and Gathering Write Operations | 3m
- Using Mapped Byte Buffers to Map Large Files in Memory | 2m 34s
- Introducing ByteBuffer to CharBuffer Conversion Using Charsets | 1m 31s
- Understanding the Patterns to Convert Bytes Using Charsets | 2m 14s
- Convert NIO Objects to I/O Objects Using the Channels Factory | 55s
- Live Coding: Simple Writing and Reading in a ByteBuffer | 3m 49s
- Live Coding: Flipping a ByteBuffer and Writing It to a File | 3m 4s
- Live Coding: Reading Back Data from the FileChannel | 2m 53s
- Live Coding: Writing Latin-1 or UTF-8 Text to a File | 4m 58s
- Live Coding: Reading Latin-1 or UTF-8 Test from a File | 2m 24s
- Module Wrap-up | 1m 16s
About the author
Passionate about programming computers for over 20 years, Jose made his debut in assembler and C, C for SIMD parallel machines before adopting Java as an object-oriented language. Assistant professor in Paris North University for more than 15 years, Jose also brings his expertise to many projects, in various industrial fields.
More Courses by Jose