simple utility to convert java objects to base64 in jruby