Java Array Range Copy copyOf(byte[] bytes)

Here you can find the source of copyOf(byte[] bytes)

Description

copy Of

License

Apache License

Declaration

public static byte[] copyOf(byte[] bytes) 

Method Source Code

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

public class Main {
    public static byte[] copyOf(byte[] bytes) {
        return copyOfRange(bytes, 0, bytes.length);
    }/*from   w w  w  . ja  v a  2s  . c  o m*/

    public static byte[] copyOfRange(byte[] bytes, int offset, int len) {
        byte[] result = new byte[len];
        System.arraycopy(bytes, offset, result, 0, len);
        return result;
    }
}

Related

  1. copyOf(boolean[] array, int length)
  2. copyOf(byte[] arr, int newLength)
  3. copyOf(byte[] b)
  4. copyOf(byte[] b, int off, int len)
  5. copyOf(byte[] b, int off, int len)
  6. copyOf(byte[] bytes, int startIndex, int length)
  7. copyOf(byte[] original, int newLength)
  8. copyOf(byte[] original, int newLength)
  9. copyOf(byte[] original, int newLength)