In this tutorial, we will check whether this associated buffer is based on a byte array or not, and provides read/write access.
The java.nio.ByteBuffer class extends java.nio.Buffer class. It provides the following methods:
|static ByteBuffer||wrap(byte b)||The wrap() method create a byte buffer by wrapping the associated byte array.|
|abstract boolean||hasArray()||The hasArray() method check associated buffer is based on byte array or not.|
ByteBuffer is based on array
Posted on: July 28, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles