Here you can find the source of copy(float[] src, Buffer dst, int numFloats, int offset)
public static void copy(float[] src, Buffer dst, int numFloats, int offset)
//package com.java2s; import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.FloatBuffer; public class Main { public static void copy(float[] src, Buffer dst, int numFloats, int offset) { copyJni(src, dst, numFloats, offset); dst.position(0);//from ww w . j av a 2s .c o m if (dst instanceof ByteBuffer) dst.limit(numFloats << 2); else if (dst instanceof FloatBuffer) dst.limit(numFloats); } native public static void copyJni(float[] src, Buffer dst, int numFloats, int offset); }