Java ShortBuffer.isDirect()
Syntax
ShortBuffer.isDirect() has the following syntax.
public abstract boolean isDirect()
Example
In the following code shows how to use ShortBuffer.isDirect() method.
import java.nio.ShortBuffer;
/*from w w w .j a v a2 s.c om*/
public class Main {
public static void main(String[] args) {
ShortBuffer bb = ShortBuffer.allocate(10);
bb.put((short)100);
System.out.println(bb.isDirect());
}
}
The code above generates the following result.