Package com.inmobi.ads.cache.diskcache
Class DiskLruCache.Editor
-
- All Implemented Interfaces:
public final class DiskLruCache.EditorEdits the values for an entry.
-
-
Method Summary
Modifier and Type Method Description InputStreamnewInputStream(int index)Returns an unbuffered input stream to read the last committed value, or null if no value has been committed. StringgetString(int index)Returns the last committed value as a string, or null if no value has been committed. OutputStreamnewOutputStream(int index)Returns a new unbuffered output stream to write the value at index.voidset(int index, String value)Sets the value at indextovalue.voidcommit()Commits this edit so it is visible to readers. voidabort()Aborts this edit. -
-
Method Detail
-
newInputStream
InputStream newInputStream(int index)
Returns an unbuffered input stream to read the last committed value, or null if no value has been committed.
-
getString
String getString(int index)
Returns the last committed value as a string, or null if no value has been committed.
-
newOutputStream
OutputStream newOutputStream(int index)
Returns a new unbuffered output stream to write the value at
index. If the underlying output stream encounters errors when writing to the filesystem, this edit will be aborted when 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 edit may 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 same key.
-
-
-
-