Java Fundamentals: NIO and NIO2

Java Fundamentals: NIO and NIO2
Java Fundamentals: NIO and NIO2
English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 3h 13m | 502 MB

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.

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 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

01 - Course Overview
02 - Introducing NIO and NIO2 APIs - What Are You Going to Learn
03 - What Do You Need to Know to Follow This Course
04 - Agenda and Organization of This Course
05 - Agenda and Organization of This Module
06 - Introducing the Java NIO API - Why It's Been Added to the JDK
07 - Understanding What NIO Provides That Is Missing in Java I_O
08 - Introducing Buffers, Channels, and Selectors
09 - Understanding Channels and In-memory File Channels
10 - Understanding Buffers and Their Main Properties
11 - Writing Content to a File Using Buffers and Channels
12 - Reading Content from a File Using the Flip Operation
13 - Understanding the Pattern to Read the Content of a File
14 - Understanding Scattering Read and Gathering Write Operations
15 - Using Mapped Byte Buffers to Map Large Files in Memory
16 - Introducing ByteBuffer to CharBuffer Conversion Using Charsets
17 - Understanding the Patterns to Convert Bytes Using Charsets
18 - Convert NIO Objects to I_O Objects Using the Channels Factory
19 - Live Coding - Simple Writing and Reading in a ByteBuffer
20 - Live Coding - Flipping a ByteBuffer and Writing It to a File
21 - Live Coding - Reading Back Data from the FileChannel
22 - Live Coding - Writing Latin-1 or UTF-8 Text to a File
23 - Live Coding - Reading Latin-1 or UTF-8 Test from a File
24 - Module Wrap-up
25 - Agenda - Understanding Asynchronous Operations Using Selectors
26 - What Does It Mean for an Operation to Be Asynchronous
27 - Understanding Selectors to Set up Asynchronous Systems in NIO
28 - Pattern to Set up a Selector to Read from a Socket Channel
29 - Setting up the Selector to Accept an Incoming Connection
30 - Read the Content Sent Through the Socket Using the Selector
31 - Live Coding - Setting up the Asynchronous Server Socket Channel
32 - Live Coding - Accepting an Incoming Connection Request
33 - Live Coding - Reading the Text Content Incoming from the Socket
34 - Live Coding - Writing a Basic Client to Send Data to the Server
35 - Module Wrap-up
36 - Agenda - Using the Use of File Systems in Java NIO2
37 - Introducing the File Systems Support in Java NIO2
38 - Understanding the API and File System Providers
39 - Modeling File Systems
40 - Understanding File Store
41 - Getting File Systems and Stores from the FileSystemProvider
42 - Creating I_O and NIO Objects with the FileSystem Object
43 - Creating Directories Using FileSystem or FileSystemProvider
44 - Pattern to Create Directories from Files, Paths, and Names
45 - Understanding Path Creation and Binding to File Systems
46 - Accessing Files Attributes Using the FileSystemProvider
47 - Introducing the Jar File System to Handle JAR and ZIP Files
48 - Creating a ZIP or JAR Archive File
49 - Copying Files and Creating Directories in a ZIP Archive File
50 - Using OutputStreams or ByteChannels to Write to an Archive File
51 - Live Coding - Pattern to Read Available File Systems
52 - Live Coding - Understanding Path Creation from FileSystems
53 - Live Coding - Getting Root Directories and File Stores
54 - Live Coding - Creating a ZIP Archive File Using the FileSystem API
55 - Live Coding - Copying Existing Files in a ZIP Archive File
56 - Live Coding - Creating Content in a ZIP Archive File
57 - Module Wrap-up
58 - Agenda - Visiting Directory Trees with NIO2
59 - Writing a Directory Filtering Pattern Using Regular Expression
60 - Using a Directory Stream to Analyze the Content of a Directory
61 - Exporing the Content of a Directory in a Depth-first Approach
62 - Using the Files.walk Pattern to Explore Directory Trees
63 - Looking for Content in a Directory Tree Using Files.find
64 - Understanding Weak Consitency When Exporing Directories
65 - Introducing the Walking Tree Pattern and File Visitors
66 - Setting up a FileVisitor to Walk a Directory Tree
67 - Using the Walking Directory Tree Pattern to Write a File Finder
68 - Live Coding - Counting Filtered Files from a Directory
69 - Live Coding - Counting Directories Using a FileVisitor on a Tree
70 - Live Coding - Couting File Types Using a FileVisitor on a Tree
71 - Module Wrap-up
72 - Agenda - Listening to File Creation Deletion and Modification
73 - Understanding Legacy Solutions to Catch File Creations
74 - Setting up a Watch Service Pattern to Listen to Events
75 - Understanding the Watch Key Object
76 - Processing Available Events from the WatchKey
77 - Live Coding - Setting up a Watch Service
78 - Live Coding - Testing the Watch Service
79 - Module and Course Wrap-up