In this tutorial, we will check short buffer is direct or not. If direct memory is allocated their memory address is fixed for the lifetime of the buffer.
The java.nio.ShortBuffer class extends java.nio.Buffer class. It provides the following methods:
|static ShortBuffer||wrap(short array)||The wrap(...) method create a short buffer by wrapping the associated short array.|
|abstract boolean||isDirect()||The isDirect() method tells whether this associated buffer is direct or not.|
Short buffer is not direct.
Short buffer is direct.
Posted on: August 12, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles