copy Bytes Into Byte Array - Android File Input Output

Android examples for File Input Output:Byte Array Copy

Description

copy Bytes Into Byte Array

Demo Code


//package com.java2s;

public class Main {
    public static void copyBytesIntoByteArray(byte[] dest, byte[] src) {
        copyBytesIntoByteArrayAtOffset(dest, src, 0);
    }//from   www  .j a v a2  s .  com

    public static void copyBytesIntoByteArrayAtOffset(byte[] dest,
            byte[] src, int offset) {
        for (int i = 0; i < src.length; i++) {
            dest[offset + i] = src[i];
        }
    }
}

Related Tutorials