Java Byte Array Copy copyBytes(byte[] src)

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

Description

copy Bytes

License

Apache License

Declaration

public static byte[] copyBytes(byte[] src) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static byte[] copyBytes(byte[] src) {
        byte[] copy = new byte[src.length];
        for (int i = 0; i < src.length; i++) {
            copy[i] = src[i];// w  w  w .j a  v a2 s .  c o m
        }
        return copy;
    }
}

Related

  1. copyBytes(byte[] dstBytes, int dstFrom, byte[] srcBytes, int srcFrom, int len)
  2. copyBytes(byte[] from, byte[] to, int fromIndex)
  3. copyBytes(byte[] from, int offset, int len)
  4. copyBytes(byte[] results, int offset, int int32)
  5. copyBytes(byte[] source, byte[] dest, int sourceFrom, int copyLength, int destFrom)
  6. copyBytes(byte[] src, byte[] target)
  7. copyBytes(byte[] src, int start, int end)
  8. copyBytes(final byte[] source, final int sOffset, final byte[] destination, final int dOffset, final int length)
  9. copyBytes(int[] srcArray, int srcPos, byte[] destBytes)