< prev index next >

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

Print this page
rev 49271 : [mq]: selector-cleanup


 380                         Util.offerLastTemporaryDirectBuffer(shadow);
 381                     vec.clearRefs(j);
 382                 }
 383             }
 384         }
 385     }
 386 
 387     public static FileDescriptor newFD(int i) {
 388         FileDescriptor fd = new FileDescriptor();
 389         setfdVal(fd, i);
 390         return fd;
 391     }
 392 
 393     static native boolean randomBytes(byte[] someBytes);
 394 
 395     /**
 396      * Returns two file descriptors for a pipe encoded in a long.
 397      * The read end of the pipe is returned in the high 32 bits,
 398      * while the write end is returned in the low 32 bits.
 399      */
 400     static native long makePipe(boolean blocking);


 401 
 402     static native boolean drain(int fd) throws IOException;
 403 
 404     public static native void configureBlocking(FileDescriptor fd,
 405                                                 boolean blocking)
 406         throws IOException;
 407 
 408     public static native int fdVal(FileDescriptor fd);
 409 
 410     static native void setfdVal(FileDescriptor fd, int value);
 411 
 412     static native int fdLimit();
 413 
 414     static native int iovMax();
 415 
 416     static native void initIDs();
 417 
 418     /**
 419      * Used to trigger loading of native libraries
 420      */


 380                         Util.offerLastTemporaryDirectBuffer(shadow);
 381                     vec.clearRefs(j);
 382                 }
 383             }
 384         }
 385     }
 386 
 387     public static FileDescriptor newFD(int i) {
 388         FileDescriptor fd = new FileDescriptor();
 389         setfdVal(fd, i);
 390         return fd;
 391     }
 392 
 393     static native boolean randomBytes(byte[] someBytes);
 394 
 395     /**
 396      * Returns two file descriptors for a pipe encoded in a long.
 397      * The read end of the pipe is returned in the high 32 bits,
 398      * while the write end is returned in the low 32 bits.
 399      */
 400     static native long makePipe(boolean blocking) throws IOException;
 401 
 402     static native int write1(int fd, byte b) throws IOException;
 403 
 404     static native boolean drain(int fd) throws IOException;
 405 
 406     public static native void configureBlocking(FileDescriptor fd,
 407                                                 boolean blocking)
 408         throws IOException;
 409 
 410     public static native int fdVal(FileDescriptor fd);
 411 
 412     static native void setfdVal(FileDescriptor fd, int value);
 413 
 414     static native int fdLimit();
 415 
 416     static native int iovMax();
 417 
 418     static native void initIDs();
 419 
 420     /**
 421      * Used to trigger loading of native libraries
 422      */
< prev index next >