Java Code Examples for sun.nio.ch.ThreadPool#wrap()
The following examples show how to use
sun.nio.ch.ThreadPool#wrap() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UnixFileSystemProvider.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path obj, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { UnixPath file = checkPath(obj); int mode = UnixFileModeAttribute .toUnixMode(UnixFileModeAttribute.ALL_READWRITE, attrs); ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); try { return UnixChannelFactory .newAsynchronousFileChannel(file, options, mode, pool); } catch (UnixException x) { x.rethrowAsIOException(file); return null; } }
Example 2
Source File: UnixFileSystemProvider.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path obj, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { UnixPath file = checkPath(obj); int mode = UnixFileModeAttribute .toUnixMode(UnixFileModeAttribute.ALL_READWRITE, attrs); ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); try { return UnixChannelFactory .newAsynchronousFileChannel(file, options, mode, pool); } catch (UnixException x) { x.rethrowAsIOException(file); return null; } }
Example 3
Source File: UnixFileSystemProvider.java From hottub with GNU General Public License v2.0 | 6 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path obj, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { UnixPath file = checkPath(obj); int mode = UnixFileModeAttribute .toUnixMode(UnixFileModeAttribute.ALL_READWRITE, attrs); ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); try { return UnixChannelFactory .newAsynchronousFileChannel(file, options, mode, pool); } catch (UnixException x) { x.rethrowAsIOException(file); return null; } }
Example 4
Source File: UnixFileSystemProvider.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path obj, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { UnixPath file = checkPath(obj); int mode = UnixFileModeAttribute .toUnixMode(UnixFileModeAttribute.ALL_READWRITE, attrs); ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); try { return UnixChannelFactory .newAsynchronousFileChannel(file, options, mode, pool); } catch (UnixException x) { x.rethrowAsIOException(file); return null; } }
Example 5
Source File: UnixFileSystemProvider.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path obj, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { UnixPath file = checkPath(obj); int mode = UnixFileModeAttribute .toUnixMode(UnixFileModeAttribute.ALL_READWRITE, attrs); ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); try { return UnixChannelFactory .newAsynchronousFileChannel(file, options, mode, pool); } catch (UnixException x) { x.rethrowAsIOException(file); return null; } }
Example 6
Source File: UnixFileSystemProvider.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path obj, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { UnixPath file = checkPath(obj); int mode = UnixFileModeAttribute .toUnixMode(UnixFileModeAttribute.ALL_READWRITE, attrs); ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); try { return UnixChannelFactory .newAsynchronousFileChannel(file, options, mode, pool); } catch (UnixException x) { x.rethrowAsIOException(file); return null; } }
Example 7
Source File: UnixFileSystemProvider.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path obj, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { UnixPath file = checkPath(obj); int mode = UnixFileModeAttribute .toUnixMode(UnixFileModeAttribute.ALL_READWRITE, attrs); ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); try { return UnixChannelFactory .newAsynchronousFileChannel(file, options, mode, pool); } catch (UnixException x) { x.rethrowAsIOException(file); return null; } }
Example 8
Source File: UnixFileSystemProvider.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path obj, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { UnixPath file = checkPath(obj); int mode = UnixFileModeAttribute .toUnixMode(UnixFileModeAttribute.ALL_READWRITE, attrs); ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); try { return UnixChannelFactory .newAsynchronousFileChannel(file, options, mode, pool); } catch (UnixException x) { x.rethrowAsIOException(file); return null; } }
Example 9
Source File: UnixFileSystemProvider.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path obj, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { UnixPath file = checkPath(obj); int mode = UnixFileModeAttribute .toUnixMode(UnixFileModeAttribute.ALL_READWRITE, attrs); ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); try { return UnixChannelFactory .newAsynchronousFileChannel(file, options, mode, pool); } catch (UnixException x) { x.rethrowAsIOException(file); return null; } }
Example 10
Source File: WindowsFileSystemProvider.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { if (path == null) throw new NullPointerException(); if (!(path instanceof WindowsPath)) throw new ProviderMismatchException(); WindowsPath file = (WindowsPath)path; ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs); try { return WindowsChannelFactory .newAsynchronousFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), options, sd.address(), pool); } catch (WindowsException x) { x.rethrowAsIOException(file); return null; } finally { if (sd != null) sd.release(); } }
Example 11
Source File: WindowsFileSystemProvider.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { if (path == null) throw new NullPointerException(); if (!(path instanceof WindowsPath)) throw new ProviderMismatchException(); WindowsPath file = (WindowsPath)path; ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs); try { return WindowsChannelFactory .newAsynchronousFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), options, sd.address(), pool); } catch (WindowsException x) { x.rethrowAsIOException(file); return null; } finally { if (sd != null) sd.release(); } }
Example 12
Source File: WindowsFileSystemProvider.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { if (path == null) throw new NullPointerException(); if (!(path instanceof WindowsPath)) throw new ProviderMismatchException(); WindowsPath file = (WindowsPath)path; ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs); try { return WindowsChannelFactory .newAsynchronousFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), options, sd.address(), pool); } catch (WindowsException x) { x.rethrowAsIOException(file); return null; } finally { if (sd != null) sd.release(); } }
Example 13
Source File: WindowsFileSystemProvider.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { if (path == null) throw new NullPointerException(); if (!(path instanceof WindowsPath)) throw new ProviderMismatchException(); WindowsPath file = (WindowsPath)path; ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs); try { return WindowsChannelFactory .newAsynchronousFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), options, sd.address(), pool); } catch (WindowsException x) { x.rethrowAsIOException(file); return null; } finally { if (sd != null) sd.release(); } }
Example 14
Source File: WindowsFileSystemProvider.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { if (path == null) throw new NullPointerException(); if (!(path instanceof WindowsPath)) throw new ProviderMismatchException(); WindowsPath file = (WindowsPath)path; ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs); try { return WindowsChannelFactory .newAsynchronousFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), options, sd.address(), pool); } catch (WindowsException x) { x.rethrowAsIOException(file); return null; } finally { if (sd != null) sd.release(); } }
Example 15
Source File: WindowsFileSystemProvider.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { if (path == null) throw new NullPointerException(); if (!(path instanceof WindowsPath)) throw new ProviderMismatchException(); WindowsPath file = (WindowsPath)path; ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs); try { return WindowsChannelFactory .newAsynchronousFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), options, sd.address(), pool); } catch (WindowsException x) { x.rethrowAsIOException(file); return null; } finally { if (sd != null) sd.release(); } }
Example 16
Source File: WindowsFileSystemProvider.java From hottub with GNU General Public License v2.0 | 5 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { if (path == null) throw new NullPointerException(); if (!(path instanceof WindowsPath)) throw new ProviderMismatchException(); WindowsPath file = (WindowsPath)path; ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs); try { return WindowsChannelFactory .newAsynchronousFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), options, sd.address(), pool); } catch (WindowsException x) { x.rethrowAsIOException(file); return null; } finally { if (sd != null) sd.release(); } }
Example 17
Source File: WindowsFileSystemProvider.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { if (path == null) throw new NullPointerException(); if (!(path instanceof WindowsPath)) throw new ProviderMismatchException(); WindowsPath file = (WindowsPath)path; ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs); try { return WindowsChannelFactory .newAsynchronousFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), options, sd.address(), pool); } catch (WindowsException x) { x.rethrowAsIOException(file); return null; } finally { if (sd != null) sd.release(); } }
Example 18
Source File: WindowsFileSystemProvider.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { if (path == null) throw new NullPointerException(); if (!(path instanceof WindowsPath)) throw new ProviderMismatchException(); WindowsPath file = (WindowsPath)path; ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs); try { return WindowsChannelFactory .newAsynchronousFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), options, sd.address(), pool); } catch (WindowsException x) { x.rethrowAsIOException(file); return null; } finally { if (sd != null) sd.release(); } }
Example 19
Source File: WindowsFileSystemProvider.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { if (path == null) throw new NullPointerException(); if (!(path instanceof WindowsPath)) throw new ProviderMismatchException(); WindowsPath file = (WindowsPath)path; ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs); try { return WindowsChannelFactory .newAsynchronousFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), options, sd.address(), pool); } catch (WindowsException x) { x.rethrowAsIOException(file); return null; } finally { if (sd != null) sd.release(); } }
Example 20
Source File: WindowsFileSystemProvider.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { if (path == null) throw new NullPointerException(); if (!(path instanceof WindowsPath)) throw new ProviderMismatchException(); WindowsPath file = (WindowsPath)path; ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0); WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs); try { return WindowsChannelFactory .newAsynchronousFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), options, sd.address(), pool); } catch (WindowsException x) { x.rethrowAsIOException(file); return null; } finally { if (sd != null) sd.release(); } }