add java support for the converter function