类 DiskLruCache.Editor
java.lang.Object
com.lark.oapi.okhttp.internal.cache.DiskLruCache.Editor
- 封闭类:
DiskLruCache
Edits the values for an entry.
-
方法概要
修饰符和类型方法说明voidabort()Aborts this edit.voidvoidcommit()Commits this edit so it is visible to readers.newSink(int index) Returns a new unbuffered output stream to write the value atindex.newSource(int index) Returns an unbuffered input stream to read the last committed value, or null if no value has been committed.
-
方法详细资料
-
newSource
Returns an unbuffered input stream to read the last committed value, or null if no value has been committed. -
newSink
Returns a new unbuffered output stream to write the value atindex. If the underlying output stream encounters errors when writing to the filesystem, this edit will be aborted whencommit()is called. The returned output stream does not throw IOExceptions. -
commit
Commits this edit so it is visible to readers. This releases the edit lock so another edit may be started on the same key.- 抛出:
IOException
-
abort
Aborts this edit. This releases the edit lock so another edit may be started on the same key.- 抛出:
IOException
-
abortUnlessCommitted
public void abortUnlessCommitted()
-