Lines Matching defs:env

39 readSingle(JNIEnv *env, jobject this, jfieldID fid) {
44 JNU_ThrowIOException(env, "Stream Closed");
51 JNU_ThrowIOExceptionWithLastError(env, "Read error");
53 JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL);
67 outOfBounds(JNIEnv *env, jint off, jint len, jbyteArray array) {
72 ((*env)->GetArrayLength(env, array) - off < len));
76 readBytes(JNIEnv *env, jobject this, jbyteArray bytes,
85 JNU_ThrowNullPointerException(env, NULL);
89 if (outOfBounds(env, off, len, bytes)) {
90 JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", NULL);
99 JNU_ThrowOutOfMemoryError(env, NULL);
108 JNU_ThrowIOException(env, "Stream Closed");
113 (*env)->SetByteArrayRegion(env, bytes, off, nread, (jbyte *)buf);
115 JNU_ThrowIOExceptionWithLastError(env, "Read error");
117 JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL);
130 writeSingle(JNIEnv *env, jobject this, jint byte, jboolean append, jfieldID fid) {
136 JNU_ThrowIOException(env, "Stream Closed");
145 JNU_ThrowIOExceptionWithLastError(env, "Write error");
147 JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL);
152 writeBytes(JNIEnv *env, jobject this, jbyteArray bytes,
161 JNU_ThrowNullPointerException(env, NULL);
165 if (outOfBounds(env, off, len, bytes)) {
166 JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", NULL);
175 JNU_ThrowOutOfMemoryError(env, NULL);
182 (*env)->GetByteArrayRegion(env, bytes, off, len, (jbyte *)buf);
184 if (!(*env)->ExceptionOccurred(env)) {
189 JNU_ThrowIOException(env, "Stream Closed");
198 JNU_ThrowIOExceptionWithLastError(env, "Write error");
201 JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL);
214 throwFileNotFoundException(JNIEnv *env, jstring path)
223 why = JNU_NewStringPlatform(env, buf);
225 x = JNU_NewObjectByName(env,
230 (*env)->Throw(env, x);