JNI: apply an internal level of API indirection to avoid having to work with massivel...