public final class DiskLruCache.Snapshot extends Object implements Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the object and release any system resources it holds.
|
DiskLruCache.Editor |
edit()
Returns an editor for this snapshot's entry, or null if either the
entry has changed since this snapshot was created or if another edit
is in progress.
|
long |
getLength(int index)
Returns the byte length of the value for
index. |
Source |
getSource(int index)
Returns the unbuffered stream with the value for
index. |
String |
key() |
public String key()
public DiskLruCache.Editor edit() throws IOException
IOExceptionpublic Source getSource(int index)
index.public long getLength(int index)
index.public void close()
CloseableAlthough only the first call has any effect, it is safe to call close
multiple times on the same object. This is more lenient than the
overridden AutoCloseable.close(), which may be called at most
once.
close in interface Closeableclose in interface AutoCloseable