A Java implementation of