How to leverage Java type conversion from Javascript running on a Rhino interpreter

Viewed 562

I have a Rhino Javascript interpreter (specifically part of the Blocklauncher Android application, a mod platform for Minecraft).

Given that Javascript numerics are floating point and I wish to convert in both directions between an array of 8 bytes and 64 bit signed integers, 64-bit floating point numerics, 64 bit date/time values and UTF-8 text, is it possible to leverage Rhino's capability to execute Java code to perform these conversions and also to perform 64-bit signed integer math?

If so, how?

Since the Rhino JS interpreter is embedded in Blocklauncher, it is not possible for me to configure it in any way. Any code must work as-is.

0 Answers
Related