A Java implementation of reverse osmosis