Added java version of parse functions.