Package org.miaixz.bus.http.cache
Class DiskLruCache.Editor
java.lang.Object
org.miaixz.bus.http.cache.DiskLruCache.Editor
-
Method Summary
Modifier and TypeMethodDescriptionvoidabort()中止这个编辑。voidvoidcommit()Commits this edit so it is visible to readers.org.miaixz.bus.core.io.sink.SinknewSink(int index) Returns a new unbuffered output stream to write the value atindex.org.miaixz.bus.core.io.source.SourcenewSource(int index) Returns an unbuffered input stream to read the last committed value, or null if no value has been committed.
-
Method Details
-
newSource
public org.miaixz.bus.core.io.source.Source newSource(int index) Returns an unbuffered input stream to read the last committed value, or null if no value has been committed. -
newSink
public org.miaixz.bus.core.io.sink.Sink newSink(int index) 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.- Throws:
IOException
-
abort
-
abortUnlessCommitted
public void abortUnlessCommitted()
-