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
59 int pwrite(FileDescriptor fd, long address, int len, long position)
60 throws IOException
61 {
62 return pwrite0(fd, address, len, position);
63 }
64
65 long writev(FileDescriptor fd, long address, int len)
66 throws IOException
67 {
68 return writev0(fd, address, len);
69 }
70
71 int force(FileDescriptor fd, boolean metaData) throws IOException {
72 return force0(fd, metaData);
73 }
74
75 int truncate(FileDescriptor fd, long size) throws IOException {
76 return truncate0(fd, size);
77 }
78
79 long size(FileDescriptor fd) throws IOException {
80 return size0(fd);
81 }
82
83 int lock(FileDescriptor fd, boolean blocking, long pos, long size,
84 boolean shared) throws IOException
85 {
86 return lock0(fd, blocking, pos, size, shared);
87 }
88
89 void release(FileDescriptor fd, long pos, long size) throws IOException {
90 release0(fd, pos, size);
91 }
92
93 void close(FileDescriptor fd) throws IOException {
94 close0(fd);
95 }
96
97 void preClose(FileDescriptor fd) throws IOException {
98 preClose0(fd);
119
120 static native int pread0(FileDescriptor fd, long address, int len,
121 long position) throws IOException;
122
123 static native long readv0(FileDescriptor fd, long address, int len)
124 throws IOException;
125
126 static native int write0(FileDescriptor fd, long address, int len)
127 throws IOException;
128
129 static native int pwrite0(FileDescriptor fd, long address, int len,
130 long position) throws IOException;
131
132 static native long writev0(FileDescriptor fd, long address, int len)
133 throws IOException;
134
135 static native int force0(FileDescriptor fd, boolean metaData)
136 throws IOException;
137
138 static native int truncate0(FileDescriptor fd, long size)
139 throws IOException;
140
141 static native long size0(FileDescriptor fd) throws IOException;
142
143 static native int lock0(FileDescriptor fd, boolean blocking, long pos,
144 long size, boolean shared) throws IOException;
145
146 static native void release0(FileDescriptor fd, long pos, long size)
147 throws IOException;
148
149 static native void close0(FileDescriptor fd) throws IOException;
150
151 static native void preClose0(FileDescriptor fd) throws IOException;
152
153 static native void closeIntFD(int fd) throws IOException;
154
155 static native void init();
156
157 }
|
1 /*
2 * Copyright (c) 2000, 2016, 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
59 int pwrite(FileDescriptor fd, long address, int len, long position)
60 throws IOException
61 {
62 return pwrite0(fd, address, len, position);
63 }
64
65 long writev(FileDescriptor fd, long address, int len)
66 throws IOException
67 {
68 return writev0(fd, address, len);
69 }
70
71 int force(FileDescriptor fd, boolean metaData) throws IOException {
72 return force0(fd, metaData);
73 }
74
75 int truncate(FileDescriptor fd, long size) throws IOException {
76 return truncate0(fd, size);
77 }
78
79 int allocate(FileDescriptor fd, long size) throws IOException {
80 return allocate0(fd, size);
81 }
82
83 long size(FileDescriptor fd) throws IOException {
84 return size0(fd);
85 }
86
87 int lock(FileDescriptor fd, boolean blocking, long pos, long size,
88 boolean shared) throws IOException
89 {
90 return lock0(fd, blocking, pos, size, shared);
91 }
92
93 void release(FileDescriptor fd, long pos, long size) throws IOException {
94 release0(fd, pos, size);
95 }
96
97 void close(FileDescriptor fd) throws IOException {
98 close0(fd);
99 }
100
101 void preClose(FileDescriptor fd) throws IOException {
102 preClose0(fd);
123
124 static native int pread0(FileDescriptor fd, long address, int len,
125 long position) throws IOException;
126
127 static native long readv0(FileDescriptor fd, long address, int len)
128 throws IOException;
129
130 static native int write0(FileDescriptor fd, long address, int len)
131 throws IOException;
132
133 static native int pwrite0(FileDescriptor fd, long address, int len,
134 long position) throws IOException;
135
136 static native long writev0(FileDescriptor fd, long address, int len)
137 throws IOException;
138
139 static native int force0(FileDescriptor fd, boolean metaData)
140 throws IOException;
141
142 static native int truncate0(FileDescriptor fd, long size)
143 throws IOException;
144
145 static native int allocate0(FileDescriptor fd, long size)
146 throws IOException;
147
148 static native long size0(FileDescriptor fd) throws IOException;
149
150 static native int lock0(FileDescriptor fd, boolean blocking, long pos,
151 long size, boolean shared) throws IOException;
152
153 static native void release0(FileDescriptor fd, long pos, long size)
154 throws IOException;
155
156 static native void close0(FileDescriptor fd) throws IOException;
157
158 static native void preClose0(FileDescriptor fd) throws IOException;
159
160 static native void closeIntFD(int fd) throws IOException;
161
162 static native void init();
163
164 }
|