bitwise And Byte Arrays - Android File Input Output

Android examples for File Input Output:Byte Array

Description

bitwise And Byte Arrays

Demo Code


//package com.java2s;

public class Main {
    public static byte[] bitwiseAndByteArrays(byte[] arr0, byte[] arr1) {
        byte[] returnArray = new byte[arr0.length];

        for (int i = 0; i < arr0.length; i++) {
            returnArray[i] = (byte) (arr0[i] & arr1[i]);
        }/*from  w ww  . j  a  v  a  2 s.c om*/

        return returnArray;
    }
}

Related Tutorials