< prev index next >

src/java.base/share/classes/sun/nio/ch/IOUtil.java

Print this page
@@ -585,14 +585,17 @@
       * Read and discard at most one byte
       * @return the number of bytes read or IOS_INTERRUPTED
       */
      static native int drain1(int fd) throws IOException;
  
-     public static native void configureBlocking(FileDescriptor fd,
-                                                 boolean blocking)
+     public static native void configureBlocking(FileDescriptor fd, boolean blocking)
          throws IOException;
  
+     public static void configureBlocking(int fd, boolean blocking) throws IOException {
+         configureBlocking(newFD(fd), blocking);
+     }
+ 
      public static native int fdVal(FileDescriptor fd);
  
      static native void setfdVal(FileDescriptor fd, int value);
  
      static native int fdLimit();
< prev index next >