-
public final class DiskLruCache.EditorEdits the values for an entry.
-
-
Method Summary
Modifier and Type Method Description SourcenewSource(int index)Returns an unbuffered input stream to read the last committed value, or null if no value hasbeen committed. SinknewSink(int index)Returns a new unbuffered output stream to write the value at {@code index}.voidcommit()Commits this edit so it is visible to readers. voidabort()Aborts this edit. voidabortUnlessCommitted()-
-
Method Detail
-
newSource
Source newSource(int index)
Returns an unbuffered input stream to read the last committed value, or null if no value hasbeen committed.
-
newSink
Sink newSink(int index)
Returns a new unbuffered output stream to write the value at
{@code index}. If the underlyingoutput stream encounters errors when writing to the filesystem, this edit will be abortedwhen commit is called. The returned output stream does not throw IOExceptions.
-
commit
void commit()
Commits this edit so it is visible to readers. This releases the edit lock so another editmay be started on the same key.
-
abort
void abort()
Aborts this edit. This releases the edit lock so another edit may be started on the samekey.
-
abortUnlessCommitted
void abortUnlessCommitted()
-
-
-
-