public final class DiskLruCache.Editor extends Object
Modifier and Type | Method and Description |
---|---|
void |
abort()
Aborts this edit.
|
void |
abortUnlessCommitted() |
void |
commit()
Commits this edit so it is visible to readers.
|
String |
getString(int index)
Returns the last committed value as a string, or null if no value
has been committed.
|
okio.Sink |
newSink(int index)
Returns a new unbuffered output stream to write the value at
index . |
okio.Source |
newSource(int index)
Returns an unbuffered input stream to read the last committed value,
or null if no value has been committed.
|
void |
set(int index,
String value)
Sets the value at
index to value . |
public okio.Source newSource(int index) throws IOException
IOException
public String getString(int index) throws IOException
IOException
public okio.Sink newSink(int index) throws IOException
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.IOException
public void set(int index, String value) throws IOException
index
to value
.IOException
public void commit() throws IOException
IOException
public void abort() throws IOException
IOException
public void abortUnlessCommitted()
Copyright © 2015. All rights reserved.