equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2008, 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 |
31 import java.nio.file.DirectoryNotEmptyException; |
31 import java.nio.file.DirectoryNotEmptyException; |
32 import java.nio.file.FileAlreadyExistsException; |
32 import java.nio.file.FileAlreadyExistsException; |
33 import java.nio.file.LinkOption; |
33 import java.nio.file.LinkOption; |
34 import java.nio.file.LinkPermission; |
34 import java.nio.file.LinkPermission; |
35 import java.nio.file.StandardCopyOption; |
35 import java.nio.file.StandardCopyOption; |
36 import java.security.AccessController; |
|
37 import java.security.PrivilegedAction; |
|
38 import java.util.concurrent.ExecutionException; |
36 import java.util.concurrent.ExecutionException; |
39 import java.util.concurrent.TimeUnit; |
37 import java.util.concurrent.TimeUnit; |
40 |
38 |
41 import static sun.nio.fs.UnixNativeDispatcher.*; |
39 import static sun.nio.fs.UnixNativeDispatcher.*; |
42 import static sun.nio.fs.UnixConstants.*; |
40 import static sun.nio.fs.UnixConstants.*; |
626 |
624 |
627 static native void transfer(int dst, int src, long addressToPollForCancel) |
625 static native void transfer(int dst, int src, long addressToPollForCancel) |
628 throws UnixException; |
626 throws UnixException; |
629 |
627 |
630 static { |
628 static { |
631 AccessController.doPrivileged(new PrivilegedAction<>() { |
629 jdk.internal.loader.BootLoader.loadLibrary("nio"); |
632 @Override |
|
633 public Void run() { |
|
634 System.loadLibrary("nio"); |
|
635 return null; |
|
636 }}); |
|
637 } |
630 } |
638 |
631 |
639 } |
632 } |