src/java.base/unix/classes/sun/nio/ch/FileDispatcherImpl.java
changeset 59146 455612b3161a
parent 52427 3c6aa484536c
child 59208 ff7655b93101
equal deleted inserted replaced
59145:ea044aedc2b6 59146:455612b3161a
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   106 
   106 
   107     void preClose(FileDescriptor fd) throws IOException {
   107     void preClose(FileDescriptor fd) throws IOException {
   108         preClose0(fd);
   108         preClose0(fd);
   109     }
   109     }
   110 
   110 
       
   111     void dup(FileDescriptor fd1, FileDescriptor fd2) throws IOException {
       
   112         dup0(fd1, fd2);
       
   113     }
       
   114 
   111     FileDescriptor duplicateForMapping(FileDescriptor fd) {
   115     FileDescriptor duplicateForMapping(FileDescriptor fd) {
   112         // file descriptor not required for mapping operations; okay
   116         // file descriptor not required for mapping operations; okay
   113         // to return invalid file descriptor.
   117         // to return invalid file descriptor.
   114         return new FileDescriptor();
   118         return new FileDescriptor();
   115     }
   119     }
   174     // NOT used by FileDispatcherImpl
   178     // NOT used by FileDispatcherImpl
   175     static native void close0(FileDescriptor fd) throws IOException;
   179     static native void close0(FileDescriptor fd) throws IOException;
   176 
   180 
   177     static native void preClose0(FileDescriptor fd) throws IOException;
   181     static native void preClose0(FileDescriptor fd) throws IOException;
   178 
   182 
       
   183     static native void dup0(FileDescriptor fd1, FileDescriptor fd2) throws IOException;
       
   184 
   179     static native void closeIntFD(int fd) throws IOException;
   185     static native void closeIntFD(int fd) throws IOException;
   180 
   186 
   181     static native int setDirect0(FileDescriptor fd) throws IOException;
   187     static native int setDirect0(FileDescriptor fd) throws IOException;
   182 
   188 
   183     static native void init();
   189     static native void init();