< prev index next >

src/windows/classes/sun/nio/ch/FileDispatcherImpl.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  73 
  74     int write(FileDescriptor fd, long address, int len) throws IOException {
  75         return write0(fd, address, len, append);
  76     }
  77 
  78     int pwrite(FileDescriptor fd, long address, int len, long position)
  79         throws IOException
  80     {
  81         return pwrite0(fd, address, len, position);
  82     }
  83 
  84     long writev(FileDescriptor fd, long address, int len) throws IOException {
  85         return writev0(fd, address, len, append);
  86     }
  87 
  88     int force(FileDescriptor fd, boolean metaData) throws IOException {
  89         return force0(fd, metaData);
  90     }
  91 
  92     int truncate(FileDescriptor fd, long size) throws IOException {





  93         return truncate0(fd, size);
  94     }
  95 
  96     long size(FileDescriptor fd) throws IOException {
  97         return size0(fd);
  98     }
  99 
 100     int lock(FileDescriptor fd, boolean blocking, long pos, long size,
 101              boolean shared) throws IOException
 102     {
 103         return lock0(fd, blocking, pos, size, shared);
 104     }
 105 
 106     void release(FileDescriptor fd, long pos, long size) throws IOException {
 107         release0(fd, pos, size);
 108     }
 109 
 110     void close(FileDescriptor fd) throws IOException {
 111         close0(fd);
 112     }


   1 /*
   2  * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  73 
  74     int write(FileDescriptor fd, long address, int len) throws IOException {
  75         return write0(fd, address, len, append);
  76     }
  77 
  78     int pwrite(FileDescriptor fd, long address, int len, long position)
  79         throws IOException
  80     {
  81         return pwrite0(fd, address, len, position);
  82     }
  83 
  84     long writev(FileDescriptor fd, long address, int len) throws IOException {
  85         return writev0(fd, address, len, append);
  86     }
  87 
  88     int force(FileDescriptor fd, boolean metaData) throws IOException {
  89         return force0(fd, metaData);
  90     }
  91 
  92     int truncate(FileDescriptor fd, long size) throws IOException {
  93         return truncate0(fd, size);
  94     }
  95 
  96     int allocate(FileDescriptor fd, long size) throws IOException {
  97         // truncate0() works for extending and truncating file size
  98         return truncate0(fd, size);
  99     }
 100 
 101     long size(FileDescriptor fd) throws IOException {
 102         return size0(fd);
 103     }
 104 
 105     int lock(FileDescriptor fd, boolean blocking, long pos, long size,
 106              boolean shared) throws IOException
 107     {
 108         return lock0(fd, blocking, pos, size, shared);
 109     }
 110 
 111     void release(FileDescriptor fd, long pos, long size) throws IOException {
 112         release0(fd, pos, size);
 113     }
 114 
 115     void close(FileDescriptor fd) throws IOException {
 116         close0(fd);
 117     }


< prev index next >