In this chapter, we will focus on the Java New IO (NIO) package's Buffer
and Channels
classes. NIO is an alternative for the earlier Java IO API and parts of the network API. While NIO is a broad and complex topic, our interest is how it provides support for network applications.
We will explore several topics, including the following:
The nature and relationship between buffers, channels, and selectors
The use of NIO techniques to build a client/server
The process of handling multiple clients
Support for asynchronous socket channels
Basic buffer operations
The NIO package provides extensive support to build efficient network applications.