Part V — Core I/O & HTTP
Master modern file and network I/O with NIO.2, asynchronous channels, and the powerful Java HTTP Client.
What You'll Learn
Build scalable I/O applications using NIO.2's non-blocking channels and selectors. Consume HTTP services, WebSocket endpoints, and real-time APIs through the modern java.net.http client library with its intuitive, functional design.
Chapters in This Part
Chapter 14. Files and Paths
Navigate the file system with java.nio.file APIs that provide robust, platform-independent file operations. Learn about path operations, atomic file operations, and the Watch Service for monitoring file system changes in real time.
Chapter 15. NIO Channels and Buffers
Understand the channel-and-buffer model that enables efficient, scalable network and file I/O. Explore character sets, data format handling, and the performance characteristics that make NIO essential for high-throughput applications.
Chapter 16. Asynchronous I/O
Master asynchronous file and socket operations with AsynchronousChannel, completion handlers, and futures. See how async I/O enables handling thousands of connections with minimal threads.
Chapter 17. HTTP Client
Discover the modern java.net.http.HttpClient—a fully asynchronous, HTTP/2 capable client library. Learn request/response patterns, streaming, form data, and integration with reactive frameworks.
Chapter 18. WebSocket Client
Extend real-time communication with WebSocket support through the standard library. Understand the lifecycle of WebSocket connections, handling messages bidirectionally, and integrating with event-driven architectures.