Added beginnings of a Java implementation