-1

Would a NIO ByteBuffer consistently offer a faster read performance than an IO BufferedStream?
If so,what would the reason be (keeping aside the multi-threading capbilities of NIO).
I read about minimized copying of the read data in the former case,while bringing the data from disk to application space.
Please help in understanding this - if this is actually true.

IUnknown
  • 9,301
  • 15
  • 50
  • 76

1 Answers1

0

They were made for different purposes.

ByteBuffer - it's just a byte buffer with a lot of convenience methods for manipulate data.

BufferedStream - it's the buffered implementation of InputStream. It's made to buffer data from one InputStream to another.

user207421
  • 305,947
  • 44
  • 307
  • 483
SergSW
  • 238
  • 2
  • 10