copy Small Arrays To Big Array - Android java.lang

Android examples for java.lang:array

Description

copy Small Arrays To Big Array

Demo Code


//package com.java2s;

public class Main {
    public static void copySmallArraysToBigArray(
            final byte[][] smallArrays, final byte[] bigArray) {
        int currentOffset = 0;
        for (final byte[] currentArray : smallArrays) {
            System.arraycopy(currentArray, 0, bigArray, currentOffset,
                    currentArray.length);
            currentOffset += currentArray.length;
        }/* w w w.j  a v a 2 s. c o  m*/
    }
}

Related Tutorials