Modify the jni encode enginer