/*
 * Copyright (c) 2012, Robert von Burg
 *
 * All rights reserved.
 *
 * This file is part of the XXX.
 *
 *  XXX is free software: you can redistribute 
 *  it and/or modify it under the terms of the GNU General Public License as 
 *  published by the Free Software Foundation, either version 3 of the License, 
 *  or (at your option) any later version.
 *
 *  XXX is distributed in the hope that it will 
 *  be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with XXX.  If not, see 
 *  <http://www.gnu.org/licenses/>.
 */
package ch.eitchnet.utils.helper;

/**
 * @author Robert von Burg <eitch@eitchnet.ch>
 * 
 */
public class ArraysHelper {

	public static boolean contains(byte[] bytes, byte searchByte) {
		for (byte b : bytes) {
			if (b == searchByte)
				return true;
		}

		return false;
	}
}

@@ -778,16 +778,42 @@
 elper;%0A%0A
+import java.util.Arrays;%0A%0A
 /**%0A * @
@@ -892,16 +892,257 @@
 lper %7B%0A%0A
+%09/**%0A%09 * Returns true if the byte array contains the given byte value%0A%09 * %0A%09 * @param bytes%0A%09 *            the array to search in%0A%09 * @param searchByte%0A%09 *            the value to search for%0A%09 * %0A%09 * @return true if found, false if not%0A%09 */%0A
 %09public 
@@ -1268,17 +1268,16 @@
 ue;%0A%09%09%7D%0A
-%0A
 %09%09return
@@ -1286,11 +1286,241 @@
 alse;%0A%09%7D
+%0A%0A%09/**%0A%09 * Creates a simple copy of the given array%0A%09 * %0A%09 * @param bytes%0A%09 *            the array to copy%0A%09 * %0A%09 * @return the copy%0A%09 */%0A%09public static byte%5B%5D copyOf(byte%5B%5D bytes) %7B%0A%09%09return Arrays.copyOf(bytes, bytes.length);%0A%09%7D
 %0A%7D%0A

add new method ArraysHelper.copyOf(byte[])