List of usage examples for java.nio DoubleBuffer reset
public final Buffer reset()
mark
. From source file:Main.java
public static ByteBuffer copyDoubleBufferAsByteBuffer(DoubleBuffer buf) { ByteBuffer dest = newByteBuffer(buf.remaining() * SIZEOF_DOUBLE); buf.mark();/* www . ja va 2s. c o m*/ dest.asDoubleBuffer().put(buf); buf.reset(); dest.rewind(); return dest; }