Java IO Tutorial - Java DoubleBuffer.isDirect()








Syntax

DoubleBuffer.isDirect() has the following syntax.

public abstract boolean isDirect()

Example

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

import java.nio.DoubleBuffer;
// w ww  .  jav  a 2  s . c  o  m
public class Main {
  private static final int BSIZE = 1024;

  public static void main(String[] args) {
    DoubleBuffer bb = DoubleBuffer.allocate(BSIZE);

    bb.put(98765);
    System.out.println(bb.isDirect());

  }
}

The code above generates the following result.