软件包 | 描述 |
---|---|
java.nio.channels |
定义了渠道,它代表的是能够执行I/O操作的实体连接,如文件和套接字;定义选择器,多路复用,非阻塞I/O操作。
|
java.nio.file.spi |
为
java.nio.file 包服务提供商类。
|
Modifier and Type | Method and Description |
---|---|
static AsynchronousFileChannel |
AsynchronousFileChannel.open(Path file, OpenOption... options)
打开或创建一个用于读取和/或写入的文件,返回一个异步文件通道来访问该文件。
|
static AsynchronousFileChannel |
AsynchronousFileChannel.open(Path file, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs)
打开或创建一个用于读取和/或写入的文件,返回一个异步文件通道来访问该文件。
|
abstract AsynchronousFileChannel |
AsynchronousFileChannel.truncate(long size)
将这一渠道的文件的大小。
|
Constructor and Description |
---|
FileLock(AsynchronousFileChannel channel, long position, long size, boolean shared)
初始化该类的一个新实例。
|
Modifier and Type | Method and Description |
---|---|
AsynchronousFileChannel |
FileSystemProvider.newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs)
打开或创建一个用于读取和/或写入的文件,返回一个异步文件通道来访问该文件。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.