Java implementation of an email spam filter