Java implementation of the Karp-Rabin string matching algorithm.