Java Byte Array Copy copyBytes(byte[] source, byte[] dest, int sourceFrom, int copyLength, int destFrom)

Here you can find the source of copyBytes(byte[] source, byte[] dest, int sourceFrom, int copyLength, int destFrom)

Description

copy Bytes

License

Open Source License

Declaration

public static void copyBytes(byte[] source, byte[] dest,
        int sourceFrom, int copyLength, int destFrom) 

Method Source Code

//package com.java2s;

public class Main {

    public static void copyBytes(byte[] source, byte[] dest,
            int sourceFrom, int copyLength, int destFrom) {
        sourceFrom = sourceFrom - 1;/*  w  ww .j  a  v a 2  s  .  c  o  m*/
        destFrom = destFrom - 1;
        for (int i = destFrom; i < destFrom + copyLength; i++) {
            dest[i] = source[sourceFrom++];
        }
    }
}

Related

  1. copyBytes(byte[] dst, int dstPos, int value)
  2. copyBytes(byte[] dstBytes, int dstFrom, byte[] srcBytes, int srcFrom, int len)
  3. copyBytes(byte[] from, byte[] to, int fromIndex)
  4. copyBytes(byte[] from, int offset, int len)
  5. copyBytes(byte[] results, int offset, int int32)
  6. copyBytes(byte[] src)
  7. copyBytes(byte[] src, byte[] target)
  8. copyBytes(byte[] src, int start, int end)
  9. copyBytes(final byte[] source, final int sOffset, final byte[] destination, final int dOffset, final int length)