Java port of JaySvcUtil