In this tutorial, we will discuss how to check long buffer is direct or not in java.
The java.nio.LongBuffer class extends java.nio.Buffer class. It provides the following methods:
| Return type | Method | Description |
| static LongBuffer | allocate( int capacity) | The allocate() method create a long buffer of specified capacity. |
| static LongBuffer | wrap(long[] array) | The wrap(...) method create a long buffer by wrapping the associated array. |
| abstract boolean | isDirect() | The isDirect() method tells whether this buffer is direct or not. |
import java.nio.*;
|
| C:\>java BufferIsDirect long buffer is not direct. long buffer is not direct. long buffer is direct. |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.