Android examples for File Input Output:Byte Array Copy
copy Bytes Into Byte Array
//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]; } } }