A simple implementation of the KMP algorithm in Java.