copy Of Range of byte array - Android File Input Output

Android examples for File Input Output:Byte Array Copy

Description

copy Of Range of byte array

Demo Code

/**//from  w  w w.  java  2  s  .  co  m
 * Source obtained from crypto-gwt. Apache 2 License.
 * https://code.google.com/p/crypto-gwt/source/browse/crypto-gwt/src/main/java/com/googlecode/
 * cryptogwt/util/ByteArrayUtils.java
 */
//package com.book2s;

public class Main {
    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 Tutorials