How does a `Buffer` function in Java NIO?
A `Buffer` is an object that performs complex computations on data without using direct memory management.
Thatâ€™s incorrect. A `Buffer` does not perform computations. It simply holds and transfers data between channels and I/O operations.
Can you describe the process of writing and reading from a buffer in Java NIO?