Java Byte Array Copy copyBytes(byte[] src, byte[] target)

Here you can find the source of copyBytes(byte[] src, byte[] target)

Description

Copies the contents of src into target.

License

Open Source License

Parameter

Parameter Description
src first array
target second array

Declaration

public static void copyBytes(byte[] src, byte[] target) 

Method Source Code

//package com.java2s;
/*/*from   www .j a v a 2s . c  om*/
 * $Id$
 * 
 * Copyright (c) 2008-2014 David Muller <roxon@users.sourceforge.net>.
 * All rights reserved. Use of the code is allowed under the
 * Artistic License 2.0 terms, as specified in the LICENSE file
 * distributed with this code, or available from
 * http://www.opensource.org/licenses/artistic-license-2.0.php
 */

public class Main {
    /**
     * Copies the contents of src into target.
     * 
     * @param src first array
     * @param target second array
     */
    public static void copyBytes(byte[] src, byte[] target) {
        System.arraycopy(src, 0, target, 0, src.length);
    }
}

Related

  1. copyBytes(byte[] from, byte[] to, int fromIndex)
  2. copyBytes(byte[] from, int offset, int len)
  3. copyBytes(byte[] results, int offset, int int32)
  4. copyBytes(byte[] source, byte[] dest, int sourceFrom, int copyLength, int destFrom)
  5. copyBytes(byte[] src)
  6. copyBytes(byte[] src, int start, int end)
  7. copyBytes(final byte[] source, final int sOffset, final byte[] destination, final int dOffset, final int length)
  8. copyBytes(int[] srcArray, int srcPos, byte[] destBytes)
  9. copyBytes(long sourceOffset, byte[] source, int sourceOff, int sourceLength, long destOffset, byte[] dest, int destLength)