List of usage examples for java.nio FloatBuffer reset
public final Buffer reset()
mark
. From source file:Main.java
public static ByteBuffer copyFloatBufferAsByteBuffer(FloatBuffer buf) { ByteBuffer dest = newByteBuffer(buf.remaining() * SIZEOF_FLOAT); buf.mark();//w w w. j a v a2 s .c o m dest.asFloatBuffer().put(buf); buf.reset(); dest.rewind(); return dest; }