src/share/native/java/io/io_util.c

Print this page

        

@@ -42,11 +42,11 @@
     FD fd = GET_FD(this, fid);
     if (fd == -1) {
         JNU_ThrowIOException(env, "Stream Closed");
         return -1;
     }
-    nread = (jint)IO_Read(fd, &ret, 1);
+    nread = IO_Read(fd, &ret, 1);
     if (nread == 0) { /* EOF */
         return -1;
     } else if (nread == JVM_IO_ERR) { /* error */
         JNU_ThrowIOExceptionWithLastError(env, "Read error");
     } else if (nread == JVM_IO_INTR) {

@@ -106,11 +106,11 @@
     fd = GET_FD(this, fid);
     if (fd == -1) {
         JNU_ThrowIOException(env, "Stream Closed");
         nread = -1;
     } else {
-        nread = (jint)IO_Read(fd, buf, len);
+        nread = IO_Read(fd, buf, len);
         if (nread > 0) {
             (*env)->SetByteArrayRegion(env, bytes, off, nread, (jbyte *)buf);
         } else if (nread == JVM_IO_ERR) {
             JNU_ThrowIOExceptionWithLastError(env, "Read error");
         } else if (nread == JVM_IO_INTR) {

@@ -135,13 +135,13 @@
     if (fd == -1) {
         JNU_ThrowIOException(env, "Stream Closed");
         return;
     }
     if (append == JNI_TRUE) {
-        n = (jint)IO_Append(fd, &c, 1);
+        n = IO_Append(fd, &c, 1);
     } else {
-        n = (jint)IO_Write(fd, &c, 1);
+        n = IO_Write(fd, &c, 1);
     }
     if (n == JVM_IO_ERR) {
         JNU_ThrowIOExceptionWithLastError(env, "Write error");
     } else if (n == JVM_IO_INTR) {
         JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL);

@@ -188,13 +188,13 @@
             if (fd == -1) {
                 JNU_ThrowIOException(env, "Stream Closed");
                 break;
             }
             if (append == JNI_TRUE) {
-                n = (jint)IO_Append(fd, buf+off, len);
+                n = IO_Append(fd, buf+off, len);
             } else {
-                n = (jint)IO_Write(fd, buf+off, len);
+                n = IO_Write(fd, buf+off, len);
             }
             if (n == JVM_IO_ERR) {
                 JNU_ThrowIOExceptionWithLastError(env, "Write error");
                 break;
             } else if (n == JVM_IO_INTR) {