Java Byte Array Copy copyBytes(byte[] dstBytes, int dstFrom, byte[] srcBytes, int srcFrom, int len)

Here you can find the source of copyBytes(byte[] dstBytes, int dstFrom, byte[] srcBytes, int srcFrom, int len)

Description

copy Bytes

License

Open Source License

Declaration

public static void copyBytes(byte[] dstBytes, int dstFrom,
        byte[] srcBytes, int srcFrom, int len) 

Method Source Code

//package com.java2s;

public class Main {

    public static void copyBytes(byte[] dstBytes, int dstFrom,
            byte[] srcBytes, int srcFrom, int len) {
        for (int i = 0; i < len; i++) {
            dstBytes[dstFrom + i] = srcBytes[srcFrom + i];
        }//from w  w  w  . ja va 2s . c  om
    }

    public static void copyBytes(byte[] dstBytes, int dstFrom,
            byte srcByte, int len) {
        for (int i = 0; i < len; i++) {
            dstBytes[dstFrom + i] = srcByte;
        }
    }
}

Related

  1. copyByteArray(byte[] array2Copy)
  2. copyByteArray(byte[] source)
  3. copyByteArray(final byte[] src, byte[] dest, int length)
  4. copyBytes(byte[] arr, int length)
  5. copyBytes(byte[] dst, int dstPos, int value)
  6. copyBytes(byte[] from, byte[] to, int fromIndex)
  7. copyBytes(byte[] from, int offset, int len)
  8. copyBytes(byte[] results, int offset, int int32)
  9. copyBytes(byte[] source, byte[] dest, int sourceFrom, int copyLength, int destFrom)