Add java compatibility functions (unused)

Signed-off-by: Eli Skeggs <skeggse@gmail.com>