I was asked a question that why a byte array is not enough and NIO specially introduces a class Buffer
?
What will be a good answer to this question? Is it only a kind of wrapper class which simplifies the read/write operation ?
If possible, please give us an example to demonstrate how we benefit from Buffer
class which can not/hardly be done with an array.