腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
搜索
关闭
文章
问答
(57)
视频
开发者手册
清单
用户
专栏
沙龙
全部问答
原创问答
Stack Exchange问答
更多筛选
回答情况:
全部
有回答
回答已采纳
提问时间:
不限
一周内
一月内
三月内
一年内
问题标签:
未找到与 相关的标签
筛选
重置
2
回答
如何关闭
AsynchronousFileChannel
根据AsynchronousChannel的
AsynchronousFileChannel
实现的API描述。因此,根据我的理解,关闭它的正确方法是将close()调用放在传递给
AsynchronousFileChannel
.write的CompletionHandler中,例如,如果我要通过
AsynchronousFileChannel
浏览 7
提问于2017-11-23
得票数 0
1
回答
Java
AsynchronousFileChannel
和ByteBuffer
我尝试使用
AsynchronousFileChannel
实现复制文件。用于读写的
AsynchronousFileChannel
对象声明为
AsynchronousFileChannel
asyncWrite =
AsynchronousFileChannel
.open(targetPath, StandardOpenOption.WR
浏览 5
修改于2015-03-07
得票数 1
回答已采纳
1
回答
Java
AsynchronousFileChannel
-线程使用
我理解Java的
AsynchronousFileChannel
是一个异步api (不阻塞调用线程),可以在系统线程池中使用线程。我的问题是:
AsynchronousFileChannel
操作是否有1:1的线程比率?换句话说,如果一个循环使用
AsynchronousFileChannel
读取100个文件,那么它是使用100个线程来读取,还是只使用少量的线程(以标准的NIO方式)?
浏览 1
提问于2016-09-15
得票数 9
回答已采纳
1
回答
jar中文件的
AsynchronousFileChannel
有没有办法打开存储在类路径上jar中的文件的
AsynchronousFileChannel
?Path path = fs.getPath(array[1]);它使用Unsu
浏览 13
修改于2017-08-30
得票数 3
回答已采纳
1
回答
AsynchronousFileChannel
抛出java.nio.file.NoSuchFileException
jhkjhkhjkhkjhkjhkjhkjhkhkjhkjhkjh".getBytes());
AsynchronousFileChannel
.open(path, StandardOpenOption.CREATE_NEW)) { Fu
浏览 3
提问于2015-03-01
得票数 1
1
回答
AsynchronousFileChannel
写入失败
我试图使用
AsynchronousFileChannel
.write将图像写入文件: + ".jpeg"); StandardOpenOpt
浏览 3
提问于2014-11-23
得票数 0
回答已采纳
1
回答
AsynchronousFileChannel
不创建子目录
StandardOpenOption> set = new HashSet<>(); set.add(CREATE);
AsynchronousFileChannel
asyncfileChannel =
AsynchronousFileChannel
.open(path, set, Executors.newFixedThreadPool
浏览 11
提问于2022-04-07
得票数 0
4
回答
AsynchronousFileChannel
如何读取大文件?
Path file = Paths.get("c:/large.log");
AsynchronousFileChannel
channel =
AsynchronousFileChannel
.open
浏览 3
修改于2013-10-23
得票数 5
1
回答
关闭
AsynchronousFileChannel
的常见成语是什么?
try (
AsynchronousFileChannel
channel = open(path)) { new CompletionHandler}}
浏览 2
提问于2022-01-29
得票数 0
回答已采纳
1
回答
如果内核不支持AIO,java
AsynchronousFileChannel
如何工作?
我有两个问题 如果我的操作系统不支持AIO (低于Linux2.6等),
AsynchronousFileChannel
将如何工作。如何将某事物附加到
AsynchronousFileChannel
中,据我所知,
AsynchronousFileChannel
只支持写(ByteBuffer、长位置、附件、CompletionHandler
浏览 3
提问于2015-07-08
得票数 0
1
回答
使用Spring Webclient和
AsynchronousFileChannel
下载文件,文件为空
我想通过网址下载几张照片,使用Webflux和
AsynchronousFileChannel
,所有的文件都是创建的,但为空。
asynchronousFileChannel
=
AsynchronousFileChannel
.open(path, CREATE, WRITE); .doOnNext(DataBufferUtils.releaseConsumer()).d
浏览 51
修改于2021-04-27
得票数 0
3
回答
为什么使用Java的
AsynchronousFileChannel
?
但是我不理解
AsynchronousFileChannel
的效率目的。 有什么想法吗?
浏览 0
修改于2010-05-05
得票数 18
2
回答
用java编写
asynchronousFileChannel
时丢失数据
我试图使用
asynchronousFileChannel
将日期写入文本文件。我用
AsynchronousFileChannel
制作了程序的3个jar文件,并通过命令提示符同时编译所有3个jar,读取3个不同的文本文件,并输出到一个常见的临时文件中。我无法理解为什么某些数据会丢失,因为它是
asynchronousFileChannel
的功能。 throws InterruptedException { Path
浏览 4
修改于2013-09-16
得票数 2
回答已采纳
2
回答
附加到带有Java 7
AsynchronousFileChannel
的文件中
我正在尝试
AsynchronousFileChannel
Java7API以异步方式编写文件,但是我找不到一种简单的方式来附加到该文件。API描述指出,
AsynchronousFileChannel
不维护文件位置,您必须指定文件位置。这意味着您必须维护一个全局文件位置值。此外,这个全局状态应该是原子的,这样您就可以正确地递增。是否有更好的使用
AsynchronousFileChannel
进行更新的方法? 另外,有人能解释一下API中附件对象的用法吗?
浏览 0
修改于2013-12-26
得票数 4
回答已采纳
1
回答
带有大量打开文件处理程序的Java
AsynchronousFileChannel
我对异步文件I/O的理解可能是错误的,但我正在尝试使用最新的JDK7的
AsynchronousFileChannel
来加速应用程序,结果却出乎意料地糟糕。在我进行如下更改之前,应用程序正在使用PrintWriter的同步模式:
AsynchronousFileChannel
writer =
AsynchronousFileChannel
.openPaths.get(outputFileName), StandardOpenOption.WRITE, St
浏览 1
修改于2011-10-23
得票数 0
2
回答
如何使用
AsynchronousFileChannel
有效地读取StringBuffer
因此,您可以使用
AsynchronousFileChannel
将整个文件读入字符串:
AsynchronousFileChannel
fileChannel =
AsynchronousFileChannel
.open
浏览 7
修改于2015-10-19
得票数 5
回答已采纳
1
回答
如何将InputStream复制到
AsynchronousFileChannel
我希望从(Tomcat ) InputStream中读取,并使用
AsynchronousFileChannel
异步地将(大型)内容复制到文件中。我可以在上读到关于的文章。try (
AsynchronousFileChannel
output =
AsynchronousFileChannel
.open(path, StandardOpenOption.CREATE, StandardOpenOption.WRITE
浏览 2
修改于2017-05-23
得票数 6
回答已采纳
1
回答
CompletionHandler在
AsynchronousFileChannel
中读取数据的用途是什么?
我正在与
AsynchronousFileChannel
一起阅读数据。对于读取数据,我发现了两个读取方法,如下所示: //2.void java.nio.channels.
AsynchronousFileChannel
.read(ByteBuffer dst, long position, A
浏览 6
修改于2020-06-20
得票数 0
回答已采纳
1
回答
如何使用
AsynchronousFileChannel
异步强制文件
Java NIO.2中的 API包含方法。我正在寻找一种在不阻塞线程的情况下实现相同目标的方法。
浏览 3
修改于2015-05-08
得票数 5
1
回答
什么时候
AsynchronousFileChannel
写入是“完成”的?
在Java语言中,当调用
AsynchronousFileChannel
.write(...)时,会收到一个Future,然后可以通过Future.get()等待完成。
浏览 2
提问于2015-10-19
得票数 6
第 2 页
第 3 页
点击加载更多
领券