Add helper functions to retrieve data from Java (since interop is quite bad)