public class DiskLruCache.Editor
Edits the values for an entry.
| 限定符和类型 | 方法和说明 |
|---|---|
void |
abort()
Aborts this edit. This releases the edit lock so another edit may be started on the same key.
|
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.
|
java.lang.String |
getString()
Returns the last committed value as a string, or null if no value has been committed.
|
java.io.InputStream |
newInputStream()
Returns an unbuffered input stream to read the last committed value, or null if no value has been committed.
|
java.io.OutputStream |
newOutputStream()
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 is called. The returned output stream does not throw IOExceptions. |
void |
set()
Sets the value at
index to value. |
public java.io.InputStream newInputStream()
Returns an unbuffered input stream to read the last committed value, or null if no value has been committed.
public java.lang.String getString()
Returns the last committed value as a string, or null if no value has been committed.
public java.io.OutputStream newOutputStream()
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 is called. The returned output stream does not throw IOExceptions.DiskLruCache.Editor.commit
public void set()
Sets the value at index to value.
public 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.
public void abort()
Aborts this edit. This releases the edit lock so another edit may be started on the same key.