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