memcpy byte array - Android File Input Output

Android examples for File Input Output:Byte Array

Description

memcpy byte array

Demo Code


//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);
    }
}

Related Tutorials