I need to perform bitwise OR of two arrays of byte in Java. How can I do so?
byte a= new byte[256]; byte b= new byte[256]; byte c; /*it should contain informati
Thats as simple as using the | operator and a loop:
public static byte[] byteOr(byte[] a, byte[] b) { int len = Math.min(a.length, b.length); byte[] result = new byte[len]; for (int i=0; i