Here you can find the source of inArray(byte needle, byte[] haystack)
public static boolean inArray(byte needle, byte[] haystack)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean inArray(byte needle, byte[] haystack) { for (byte item : haystack) { if (item == needle) { return true; }//from w w w . j av a 2 s . c o m } return false; } }