The isDirect() method of java.nio.ByteBuffer Class is used to tell whether or not this byte buffer is direct.
public abstract boolean isDirect()
Return Value: This method returns true if, and only if, this buffer is direct.
Below are the examples to illustrate the isDirect() method:
buffer is direct
buffer is not direct
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.