FloatBuffer.isDirect() has the following syntax.
public abstract boolean isDirect()
In the following code shows how to use FloatBuffer.isDirect() method.
import java.nio.FloatBuffer; /* w w w. j a va2 s. c om*/ 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.