return ret;
}
- jobjectArray NewObjectArray(jsize len, jclass cls, jobject init)
+ jbyteArray NewByteArray(jsize len)
+ {
+ auto ret = m_env->NewByteArray(len);
+ if (m_env->ExceptionCheck()) throw JavaException();
+ return ret;
+ }
+
+ jobjectArray NewObjectArray(jsize len, jclass cls, jobject init)
{
auto ret = m_env->NewObjectArray(len, cls, init);
if (m_env->ExceptionCheck()) throw JavaException();
return ret;
}
+ jbyte *GetByteArrayElements(jbyteArray array, jboolean *value)
+ {
+ auto ret = m_env->GetByteArrayElements(array, value);
+ if (m_env->ExceptionCheck()) throw JavaException();
+ return ret;
+ }
+
void SetObjectArrayElement(jobjectArray array, jsize index, jobject val)
{
m_env->SetObjectArrayElement(array, index, val);
if (m_env->ExceptionCheck()) throw JavaException();
}
+ void SetByteArrayRegion(jbyteArray array, jsize start, jsize len, const jbyte *buf)
+ {
+ m_env->SetByteArrayRegion(array, start, len, buf);
+ if (m_env->ExceptionCheck()) throw JavaException();
+ }
+
void* GetPrimitiveArrayCritical(jarray array, jboolean* isCopy)
{
auto ret = m_env->GetPrimitiveArrayCritical(array, isCopy);
if (m_env->ExceptionCheck()) throw JavaException();
}
- void ThrowNew(jclass cls, const char* msg) {
+ void ReleaseByteArrayElements(jbyteArray array, jbyte* byteArray, int mode)
+ {
+ m_env->ReleaseByteArrayElements(array, byteArray, mode);
+ if (m_env->ExceptionCheck()) throw JavaException();
+ }
+
+ void ThrowNew(jclass cls, const char* msg)
+ {
m_env->ThrowNew(cls, msg);
throw JavaException();
}