Package com.zing.zalo.zbrowser.cache
Class DiskLruCache.Snapshot
- java.lang.Object
-
- com.zing.zalo.zbrowser.cache.DiskLruCache.Snapshot
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
- DiskLruCache
public final class DiskLruCache.Snapshot extends Object implements Closeable
A snapshot of the values for an entry.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()DiskLruCache.Editoredit()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.InputStreamgetInputStream(int index)Returns the unbuffered stream with the value forindex.longgetLength(int index)Returns the byte length of the value forindex.StringgetString(int index)Returns the string value forindex.
-
-
-
Method Detail
-
edit
public DiskLruCache.Editor edit() throws IOException
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.- Throws:
IOException
-
getInputStream
public InputStream getInputStream(int index)
Returns the unbuffered stream with the value forindex.
-
getString
public String getString(int index) throws IOException
Returns the string value forindex.- Throws:
IOException
-
getLength
public long getLength(int index)
Returns the byte length of the value forindex.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-