简体   繁体   中英

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.

See the FileHandle API , which has source() and sink() methods to read or write sequentially. If you call sink().buffer() the result implements WritableByteChannel and source().buffer() implements ReadableByteChannel .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM