List of usage examples for java.nio IntBuffer isDirect
public abstract boolean isDirect();
From source file:Main.java
public static void main(String[] args) { IntBuffer bb = IntBuffer.allocate(10); bb.put(100);//from w w w. j a v a 2 s .c o m System.out.println(bb.isDirect()); }
From source file:Main.java
public static IntBuffer clone(final IntBuffer buf) { if (buf == null) { return null; }// ww w . j a va 2s .co m buf.rewind(); final IntBuffer copy; if (buf.isDirect()) { copy = createIntBuffer(buf.limit()); } else { copy = createIntBufferOnHeap(buf.limit()); } copy.put(buf); return copy; }