private static int[] initNext( byte[] pattern ) 
	{
		int[] next = new int [pattern.length];
		int i = 0, j = -1;
		next[0] = -1;
		while (i < pattern.length - 1) 
		{
			while ( j >= 0 && pattern[i] != pattern[j] )
				j = next[j];
			i++; j++;
			next[i] = j;
		}
		return next;
	}