189 |
* Writes a single byte to the specified file descriptor |
* Writes a single byte to the specified file descriptor |
190 |
* Return status code, exception on error |
* Return status code, exception on error |
191 |
*/ |
*/ |
192 |
JNIEXPORT jint JNICALL |
JNIEXPORT jlong JNICALL |
193 |
Java_java_io_FileDescriptor_nativeWriteByte(JNIEnv *env, jobject obj, |
Java_java_io_FileDescriptor_nativeWriteByte(JNIEnv *env, jobject obj, |
194 |
jlong fd, jint b) |
jlong fd, jint b) |
195 |
{ |
{ |
220 |
* Writes a byte buffer to the specified file descriptor |
* Writes a byte buffer to the specified file descriptor |
221 |
* Return status code, exception on error |
* Return status code, exception on error |
222 |
*/ |
*/ |
223 |
JNIEXPORT jint JNICALL |
JNIEXPORT jlong JNICALL |
224 |
Java_java_io_FileDescriptor_nativeWriteBuf(JNIEnv *env, jobject obj, |
Java_java_io_FileDescriptor_nativeWriteBuf(JNIEnv *env, jobject obj, |
225 |
jlong fd, jarray buf, jint offset, |
jlong fd, jbyteArray buf, |
226 |
jint len) |
jint offset, jint len) |
227 |
{ |
{ |
228 |
int native_fd; |
int native_fd; |
229 |
ssize_t rc, bytes_written = 0; |
ssize_t rc, bytes_written = 0; |