Java Array Copy copyArrays(byte[] dest, byte[] source, int fromIdx)

Here you can find the source of copyArrays(byte[] dest, byte[] source, int fromIdx)

Description

Describe copyArrays method here.

License

Open Source License

Parameter

Parameter Description
dest a <code>byte[]</code> value
source a <code>byte[]</code> value
fromIdx an <code>int</code> value

Declaration

public static void copyArrays(byte[] dest, byte[] source, int fromIdx) 

Method Source Code

//package com.java2s;
/*/*from   ww  w  . j a  va2s .  c o  m*/
 *    GeoTools - The Open Source Java GIS Toolkit
 *    http://geotools.org
 *
 *    (C) 2003-2008, Open Source Geospatial Foundation (OSGeo)
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation;
 *    version 2.1 of the License.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 */

public class Main {
    /**
     * Describe <code>copyArrays</code> method here.
     *
     * @param dest a <code>byte[]</code> value
     * @param source a <code>byte[]</code> value
     * @param fromIdx an <code>int</code> value
     */
    public static void copyArrays(byte[] dest, byte[] source, int fromIdx) {
        for (int i = 0; i < dest.length; i++) {
            dest[i] = source[i + fromIdx];
        }
    }
}

Related

  1. copyArrayAddFirst(String[] arr, String add)
  2. copyArrayCutFirst(String[] arr)
  3. copyArrayExceptLast(String[] array)
  4. copyArrayMax(int[] local, int[] merged)
  5. copyArrayRange(final byte[] value, int start, int end)
  6. copyArrays(byte[] src, int srcOffset, byte[] dst, int dstOffset, int numBytes)
  7. copyArrayToStr(String[] src, String del)
  8. copyArrayWhenNotNull(byte[] source)
  9. copyBytes(byte[] data, int from, int to)