Android examples for File Input Output:Byte Array
memcpy byte array
//package com.java2s; public class Main { public static void memcpy(byte[] dest, byte[] source, int size, int destOffset, int sourceOffset) { for (int i = 0; i < size; i++) { dest[i + destOffset] = source[i + sourceOffset]; }//from w w w . j a v a 2s . com } public static void memcpy(byte[] dest, byte[] source, int size) { memcpy(dest, source, size, /*destOffset=*/0, /*destOffset=*/0); } }