| 160 | } |
| 161 | |
| 162 | inline int doRead(JNIEnv* e, jint fd, jbyte* data, jint length) |
| 163 | { |
| 164 | int r = READ(fd, data, length); |
| 165 | if (r > 0) { |
| 166 | return r; |
| 167 | } else if (r == 0) { |
| 168 | return -1; |
| 169 | } else { |
| 170 | throwNewErrno(e, "java/io/IOException"); |
| 171 | return 0; |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | inline void doWrite(JNIEnv* e, jint fd, const jbyte* data, jint length) |
| 176 | { |
no test coverage detected