public static boolean getAndSet(final byte[] array, final int index) {
		final boolean result = get(array, index);
		set(array, index);
		return result;
	}
Copies the specified range of the specified array into a new array.

@param data the bits from which a range is to be copied
@param start the initial index of the range to be copied, inclusive
@param end the final index of the range to be copied, exclusive.
@return a new array containing the specified range from the original array
@throws ArrayIndexOutOfBoundsException if start &lt; 0 or
        start &gt; data.length*8
@throws IllegalArgumentException if start &gt; end
@throws NullPointerException if the {@code data} array is
        {@code null}.
jenetics/src/main/java/io/jenetics/internal/util/Bits.java