[Java]: Added support to DirectBuffer to address off-heap memory allocated with Unsafe or a JNI function.