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 ava2s. c om*/ } return false; } public static <T> boolean inArray(T object, T[] array) { for (T item : array) { if (object.equals(item)) { return true; } } return false; } }