簡體   English   中英

okio FileHandle有沒有類似於java中的RandomAccessFile.getchannel()的東西?

[英]Does okio FileHandle have something similar to RandomAccessFile.getchannel() in java?

我的問題是如果緩沖區被拆分,我想讓它具有傳染性。 在 java 中,我為此使用了 FileChannel。

請參閱FileHandle API ,它具有source()sink()方法來順序讀取或寫入。 如果你調用sink().buffer() ,結果實現WritableByteChannelsource().buffer()實現ReadableByteChannel

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM