JNI Wrapper: Implemented the processInplace() function.