Java IO Tutorial - Java IntBuffer.isDirect()








Syntax

IntBuffer.isDirect() has the following syntax.

public abstract boolean isDirect()

Example

In the following code shows how to use IntBuffer.isDirect() method.

/*from  w  w  w  .j  a va 2s . c  o m*/
import java.nio.IntBuffer;

public class Main {
  public static void main(String[] args) {
    IntBuffer bb = IntBuffer.allocate(10);
    bb.put(100);
    System.out.println(bb.isDirect());

  }
}

The code above generates the following result.