com.jakewharton.disklrucache
Class DiskLruCache.Snapshot

java.lang.Object
  extended by com.jakewharton.disklrucache.DiskLruCache.Snapshot
All Implemented Interfaces:
Closeable
Enclosing class:
DiskLruCache

public final class DiskLruCache.Snapshot
extends Object
implements Closeable

A snapshot of the values for an entry.


Method Summary
 void close()
           
 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.
 InputStream getInputStream(int index)
          Returns the unbuffered stream with the value for index.
 long getLength(int index)
          Returns the byte length of the value for index.
 String getString(int index)
          Returns the string value for index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 for index.


getString

public String getString(int index)
                 throws IOException
Returns the string value for index.

Throws:
IOException

getLength

public long getLength(int index)
Returns the byte length of the value for index.


close

public void close()
Specified by:
close in interface Closeable


Copyright © 2012-2013 Jake Wharton. All Rights Reserved.