[英]Does okio FileHandle have something similar to RandomAccessFile.getchannel() in java?
My problem is if the buffer is split, I want to make it contagious.我的问题是如果缓冲区被拆分,我想让它具有传染性。 In java, I used FileChannel for this purpose.
在 java 中,我为此使用了 FileChannel。
See the FileHandle API , which has source()
and sink()
methods to read or write sequentially.请参阅FileHandle API ,它具有
source()
和sink()
方法来顺序读取或写入。 If you call sink().buffer()
the result implements WritableByteChannel
and source().buffer()
implements ReadableByteChannel
.如果你调用
sink().buffer()
,结果实现WritableByteChannel
和source().buffer()
实现ReadableByteChannel
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.