Java FloatBuffer.isDirect()

Syntax

FloatBuffer.isDirect() has the following syntax.

public abstract boolean isDirect()

Example

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


import java.nio.FloatBuffer;
/*from   w  w w . java2s. c  o m*/
public class Main {
  public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);
    
    floatBuffer.put(1,1.23F);
    
    System.out.println(floatBuffer.isDirect());

  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.nio »




Buffer
ByteBuffer
ByteOrder
CharBuffer
DoubleBuffer
FloatBuffer
IntBuffer
LongBuffer
MappedByteBuffer
ShortBuffer