Ported largest remaining java file (Port #28)

25 was used twice so I skipped 27