public static byte[] reverse(final byte[] array) {
		int i = 0;
		int j = array.length;

		while (i < j) {
			swap(array, i++, --j);
		}

		return array;
	}
Flip the bit at the given index.

@param data the data array.
@param index the index of the bit to flip.
@return the input array, for command chaining
@throws IndexOutOfBoundsException if the index is
         {@code index >= max || index < 0}.
@throws NullPointerException if the {@code data} array is {@code null}.
jenetics/src/main/java/io/jenetics/internal/util/Bits.java