author | mchung |
Tue, 06 Nov 2018 10:01:16 -0800 | |
changeset 52427 | 3c6aa484536c |
parent 49897 | 117501815bed |
child 53018 | 8bf9268df0e2 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
49897
117501815bed
8202261: (fc) FileChannel.map and RandomAccessFile.setLength should not preallocate space
alanb
parents:
48224
diff
changeset
|
2 |
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
* |
|
5506 | 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 |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package sun.nio.ch; |
|
27 |
||
27937
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
28 |
import java.io.FileDescriptor; |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
29 |
import java.io.IOException; |
52427
3c6aa484536c
8211122: Reduce the number of internal classes made accessible to jdk.unsupported
mchung
parents:
49897
diff
changeset
|
30 |
import jdk.internal.access.SharedSecrets; |
3c6aa484536c
8211122: Reduce the number of internal classes made accessible to jdk.unsupported
mchung
parents:
49897
diff
changeset
|
31 |
import jdk.internal.access.JavaIOFileDescriptorAccess; |
37593
824750ada3d6
8154231: Simplify access to System properties from JDK code
redestad
parents:
32834
diff
changeset
|
32 |
import sun.security.action.GetPropertyAction; |
47428 | 33 |
import java.io.File; |
34 |
import java.nio.CharBuffer; |
|
2 | 35 |
|
27937
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
36 |
class FileDispatcherImpl extends FileDispatcher { |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
37 |
|
27263
819f5f87d485
8023173: FileDescriptor should respect append flag
igerasim
parents:
25859
diff
changeset
|
38 |
private static final JavaIOFileDescriptorAccess fdAccess = |
819f5f87d485
8023173: FileDescriptor should respect append flag
igerasim
parents:
25859
diff
changeset
|
39 |
SharedSecrets.getJavaIOFileDescriptorAccess(); |
819f5f87d485
8023173: FileDescriptor should respect append flag
igerasim
parents:
25859
diff
changeset
|
40 |
|
27937
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
41 |
// set to true if fast file transmission (TransmitFile) is enabled |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
42 |
private static final boolean fastFileTransfer; |
2 | 43 |
|
27937
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
44 |
FileDispatcherImpl() { } |
7515
43202796198e
6709457: (fc) lock/tryLock() throws IOException "Access is denied" when file opened for append [win]
alanb
parents:
7025
diff
changeset
|
45 |
|
16921
e70261f11307
8012019: (fc) Thread.interrupt triggers hang in FileChannelImpl.pread (win)
alanb
parents:
7668
diff
changeset
|
46 |
@Override |
e70261f11307
8012019: (fc) Thread.interrupt triggers hang in FileChannelImpl.pread (win)
alanb
parents:
7668
diff
changeset
|
47 |
boolean needsPositionLock() { |
e70261f11307
8012019: (fc) Thread.interrupt triggers hang in FileChannelImpl.pread (win)
alanb
parents:
7668
diff
changeset
|
48 |
return true; |
e70261f11307
8012019: (fc) Thread.interrupt triggers hang in FileChannelImpl.pread (win)
alanb
parents:
7668
diff
changeset
|
49 |
} |
e70261f11307
8012019: (fc) Thread.interrupt triggers hang in FileChannelImpl.pread (win)
alanb
parents:
7668
diff
changeset
|
50 |
|
2 | 51 |
int read(FileDescriptor fd, long address, int len) |
52 |
throws IOException |
|
53 |
{ |
|
54 |
return read0(fd, address, len); |
|
55 |
} |
|
56 |
||
16921
e70261f11307
8012019: (fc) Thread.interrupt triggers hang in FileChannelImpl.pread (win)
alanb
parents:
7668
diff
changeset
|
57 |
int pread(FileDescriptor fd, long address, int len, long position) |
e70261f11307
8012019: (fc) Thread.interrupt triggers hang in FileChannelImpl.pread (win)
alanb
parents:
7668
diff
changeset
|
58 |
throws IOException |
2 | 59 |
{ |
16921
e70261f11307
8012019: (fc) Thread.interrupt triggers hang in FileChannelImpl.pread (win)
alanb
parents:
7668
diff
changeset
|
60 |
return pread0(fd, address, len, position); |
2 | 61 |
} |
62 |
||
63 |
long readv(FileDescriptor fd, long address, int len) throws IOException { |
|
64 |
return readv0(fd, address, len); |
|
65 |
} |
|
66 |
||
67 |
int write(FileDescriptor fd, long address, int len) throws IOException { |
|
27263
819f5f87d485
8023173: FileDescriptor should respect append flag
igerasim
parents:
25859
diff
changeset
|
68 |
return write0(fd, address, len, fdAccess.getAppend(fd)); |
2 | 69 |
} |
70 |
||
16921
e70261f11307
8012019: (fc) Thread.interrupt triggers hang in FileChannelImpl.pread (win)
alanb
parents:
7668
diff
changeset
|
71 |
int pwrite(FileDescriptor fd, long address, int len, long position) |
e70261f11307
8012019: (fc) Thread.interrupt triggers hang in FileChannelImpl.pread (win)
alanb
parents:
7668
diff
changeset
|
72 |
throws IOException |
2 | 73 |
{ |
16921
e70261f11307
8012019: (fc) Thread.interrupt triggers hang in FileChannelImpl.pread (win)
alanb
parents:
7668
diff
changeset
|
74 |
return pwrite0(fd, address, len, position); |
2 | 75 |
} |
76 |
||
77 |
long writev(FileDescriptor fd, long address, int len) throws IOException { |
|
27263
819f5f87d485
8023173: FileDescriptor should respect append flag
igerasim
parents:
25859
diff
changeset
|
78 |
return writev0(fd, address, len, fdAccess.getAppend(fd)); |
2 | 79 |
} |
80 |
||
49897
117501815bed
8202261: (fc) FileChannel.map and RandomAccessFile.setLength should not preallocate space
alanb
parents:
48224
diff
changeset
|
81 |
long seek(FileDescriptor fd, long offset) throws IOException { |
117501815bed
8202261: (fc) FileChannel.map and RandomAccessFile.setLength should not preallocate space
alanb
parents:
48224
diff
changeset
|
82 |
return seek0(fd, offset); |
117501815bed
8202261: (fc) FileChannel.map and RandomAccessFile.setLength should not preallocate space
alanb
parents:
48224
diff
changeset
|
83 |
} |
117501815bed
8202261: (fc) FileChannel.map and RandomAccessFile.setLength should not preallocate space
alanb
parents:
48224
diff
changeset
|
84 |
|
2057
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
85 |
int force(FileDescriptor fd, boolean metaData) throws IOException { |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
86 |
return force0(fd, metaData); |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
87 |
} |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
88 |
|
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
89 |
int truncate(FileDescriptor fd, long size) throws IOException { |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
90 |
return truncate0(fd, size); |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
91 |
} |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
92 |
|
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
93 |
long size(FileDescriptor fd) throws IOException { |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
94 |
return size0(fd); |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
95 |
} |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
96 |
|
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
97 |
int lock(FileDescriptor fd, boolean blocking, long pos, long size, |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
98 |
boolean shared) throws IOException |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
99 |
{ |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
100 |
return lock0(fd, blocking, pos, size, shared); |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
101 |
} |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
102 |
|
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
103 |
void release(FileDescriptor fd, long pos, long size) throws IOException { |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
104 |
release0(fd, pos, size); |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
105 |
} |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
106 |
|
2 | 107 |
void close(FileDescriptor fd) throws IOException { |
47235
9ef10c6e67b8
8187631: Refactor FileDescriptor close implementation
rriggs
parents:
47216
diff
changeset
|
108 |
fdAccess.close(fd); |
2 | 109 |
} |
110 |
||
7025
6e002f9a2899
6816049: (bf) MappedByteBuffer.force() method does not flush data correctly
alanb
parents:
5506
diff
changeset
|
111 |
FileDescriptor duplicateForMapping(FileDescriptor fd) throws IOException { |
6e002f9a2899
6816049: (bf) MappedByteBuffer.force() method does not flush data correctly
alanb
parents:
5506
diff
changeset
|
112 |
// on Windows we need to keep a handle to the file |
6e002f9a2899
6816049: (bf) MappedByteBuffer.force() method does not flush data correctly
alanb
parents:
5506
diff
changeset
|
113 |
FileDescriptor result = new FileDescriptor(); |
6e002f9a2899
6816049: (bf) MappedByteBuffer.force() method does not flush data correctly
alanb
parents:
5506
diff
changeset
|
114 |
long handle = duplicateHandle(fdAccess.getHandle(fd)); |
6e002f9a2899
6816049: (bf) MappedByteBuffer.force() method does not flush data correctly
alanb
parents:
5506
diff
changeset
|
115 |
fdAccess.setHandle(result, handle); |
48224
be0df5ab3093
8080225: FileInput/OutputStream/FileChannel cleanup should be improved
rriggs
parents:
47428
diff
changeset
|
116 |
fdAccess.registerCleanup(result); |
7025
6e002f9a2899
6816049: (bf) MappedByteBuffer.force() method does not flush data correctly
alanb
parents:
5506
diff
changeset
|
117 |
return result; |
6e002f9a2899
6816049: (bf) MappedByteBuffer.force() method does not flush data correctly
alanb
parents:
5506
diff
changeset
|
118 |
} |
6e002f9a2899
6816049: (bf) MappedByteBuffer.force() method does not flush data correctly
alanb
parents:
5506
diff
changeset
|
119 |
|
27937
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
120 |
boolean canTransferToDirectly(java.nio.channels.SelectableChannel sc) { |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
121 |
return fastFileTransfer && sc.isBlocking(); |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
122 |
} |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
123 |
|
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
124 |
boolean transferToDirectlyNeedsPositionLock() { |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
125 |
return true; |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
126 |
} |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
127 |
|
49897
117501815bed
8202261: (fc) FileChannel.map and RandomAccessFile.setLength should not preallocate space
alanb
parents:
48224
diff
changeset
|
128 |
int setDirectIO(FileDescriptor fd, String path) { |
47428 | 129 |
int result = -1; |
130 |
String filePath = path.substring(0, path.lastIndexOf(File.separator)); |
|
131 |
CharBuffer buffer = CharBuffer.allocate(filePath.length()); |
|
132 |
buffer.put(filePath); |
|
133 |
try { |
|
134 |
result = setDirect0(fd, buffer); |
|
135 |
} catch (IOException e) { |
|
136 |
throw new UnsupportedOperationException |
|
137 |
("Error setting up DirectIO", e); |
|
138 |
} |
|
139 |
return result; |
|
140 |
} |
|
141 |
||
27937
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
142 |
static boolean isFastFileTransferRequested() { |
37593
824750ada3d6
8154231: Simplify access to System properties from JDK code
redestad
parents:
32834
diff
changeset
|
143 |
String fileTransferProp = GetPropertyAction |
37781
71ed5645f17c
8155775: Re-examine naming of privileged methods to access System properties
redestad
parents:
37593
diff
changeset
|
144 |
.privilegedGetProperty("jdk.nio.enableFastFileTransfer"); |
27937
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
145 |
boolean enable; |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
146 |
if ("".equals(fileTransferProp)) { |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
147 |
enable = true; |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
148 |
} else { |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
149 |
enable = Boolean.parseBoolean(fileTransferProp); |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
150 |
} |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
151 |
return enable; |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
152 |
} |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
153 |
|
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
154 |
static { |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
155 |
IOUtil.load(); |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
156 |
fastFileTransfer = isFastFileTransferRequested(); |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
157 |
} |
0c9f63e42e91
8064407: (fc) FileChannel transferTo should use TransmitFile on Windows
alanb
parents:
27263
diff
changeset
|
158 |
|
2 | 159 |
//-- Native methods |
160 |
||
161 |
static native int read0(FileDescriptor fd, long address, int len) |
|
162 |
throws IOException; |
|
163 |
||
164 |
static native int pread0(FileDescriptor fd, long address, int len, |
|
165 |
long position) throws IOException; |
|
166 |
||
167 |
static native long readv0(FileDescriptor fd, long address, int len) |
|
168 |
throws IOException; |
|
169 |
||
7515
43202796198e
6709457: (fc) lock/tryLock() throws IOException "Access is denied" when file opened for append [win]
alanb
parents:
7025
diff
changeset
|
170 |
static native int write0(FileDescriptor fd, long address, int len, boolean append) |
2 | 171 |
throws IOException; |
172 |
||
173 |
static native int pwrite0(FileDescriptor fd, long address, int len, |
|
174 |
long position) throws IOException; |
|
175 |
||
7515
43202796198e
6709457: (fc) lock/tryLock() throws IOException "Access is denied" when file opened for append [win]
alanb
parents:
7025
diff
changeset
|
176 |
static native long writev0(FileDescriptor fd, long address, int len, boolean append) |
2 | 177 |
throws IOException; |
178 |
||
49897
117501815bed
8202261: (fc) FileChannel.map and RandomAccessFile.setLength should not preallocate space
alanb
parents:
48224
diff
changeset
|
179 |
static native long seek0(FileDescriptor fd, long offset) throws IOException; |
117501815bed
8202261: (fc) FileChannel.map and RandomAccessFile.setLength should not preallocate space
alanb
parents:
48224
diff
changeset
|
180 |
|
2057
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
181 |
static native int force0(FileDescriptor fd, boolean metaData) |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
182 |
throws IOException; |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
183 |
|
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
184 |
static native int truncate0(FileDescriptor fd, long size) |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
185 |
throws IOException; |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
186 |
|
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
187 |
static native long size0(FileDescriptor fd) throws IOException; |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
188 |
|
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
189 |
static native int lock0(FileDescriptor fd, boolean blocking, long pos, |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
190 |
long size, boolean shared) throws IOException; |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
191 |
|
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
192 |
static native void release0(FileDescriptor fd, long pos, long size) |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
193 |
throws IOException; |
3acf8e5e2ca0
6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
2
diff
changeset
|
194 |
|
2 | 195 |
static native void close0(FileDescriptor fd) throws IOException; |
196 |
||
7025
6e002f9a2899
6816049: (bf) MappedByteBuffer.force() method does not flush data correctly
alanb
parents:
5506
diff
changeset
|
197 |
static native long duplicateHandle(long fd) throws IOException; |
47428 | 198 |
|
199 |
static native int setDirect0(FileDescriptor fd, CharBuffer buffer) throws IOException; |
|
2 | 200 |
} |