Android Array Copy copy(float[] src, Buffer dst, int numFloats, int offset)

Here you can find the source of copy(float[] src, Buffer dst, int numFloats, int offset)

Description

copy

Declaration

public static void copy(float[] src, Buffer dst, int numFloats,
            int offset) 

Method Source Code

//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);
}

Related

  1. copyOf(int[][] obj)
  2. copyOf(long[] obj)
  3. copyOf(long[] obj, int newSize)
  4. copyOfRange(final byte[] source, final int from, final int to)
  5. copy(int[] rSource)
  6. appendWhereArgsToSelectionArgs( String[] selectionArgs, String[] whereArgs)
  7. arraycopy(String src, int srcOffset, byte[] dst, int dstOffset, int length)
  8. arraycopy(byte[] from, byte[] to)
  9. arrayCopy(byte[] src, int srcPos, byte[] dest, int destPos, int length)