NIO is based on buffers, whose contents are sent to or received from I/O services via channels. This chapter introduces you to NIO’s buffer classes.
A buffer is an object that stores a fixed amount of data to be sent to or received from an I/O service (an operating system component for performing input/output). It sits between an application and a channel that writes the buffered data to the service or reads the data from the service and deposits it into the buffer.
Buffers possess four properties: