public static int indexOf(byte[] array, byte[] target) {
        Preconditions.checkNotNull(array, "array");
        Preconditions.checkNotNull(target, "target");
        if (target.length == 0) {
            return 0;
        }

        outer:
        for (int i = 0; i < array.length - target.length + 1; i++) {
            for (int j = 0; j < target.length; j++) {
                if (array[i + j] != target[j]) {
                    continue outer;
                }
            }
            return i;
        }
        return -1;
    }
Returns the start position of the first occurrence of the specified {@code
target} within {@code array}, or {@code -1} if there is no such occurrence.
<p>
More formally, returns the lowest index {@code i} such that {@code
java.util.Arrays.copyOfRange(array, i, i + target.length)} contains exactly the same elements
as {@code target}.

@param array  the array to search for the sequence {@code target}
@param target the array to search for as a sub-sequence of {@code array}
stroom-bytebuffer/src/main/java/stroom/bytebuffer/hbase/Bytes.java