com.bumptech.glide.disklrucache
Class DiskLruCache.Editor

java.lang.Object
  extended by com.bumptech.glide.disklrucache.DiskLruCache.Editor
Enclosing class:
DiskLruCache

public final class DiskLruCache.Editor
extends Object

Edits the values for an entry.


Method Summary
 void abort()
          Aborts this edit.
 void abortUnlessCommitted()
           
 void commit()
          Commits this edit so it is visible to readers.
 File getFile(int index)
           
 String getString(int index)
          Returns the last committed value as a string, or null if no value has been committed.
 void set(int index, String value)
          Sets the value at index to value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getString

public String getString(int index)
                 throws IOException
Returns the last committed value as a string, or null if no value has been committed.

Throws:
IOException

getFile

public File getFile(int index)
             throws IOException
Throws:
IOException

set

public void set(int index,
                String value)
         throws IOException
Sets the value at index to value.

Throws:
IOException

commit

public void commit()
            throws IOException
Commits this edit so it is visible to readers. This releases the edit lock so another edit may be started on the same key.

Throws:
IOException

abort

public void abort()
           throws IOException
Aborts this edit. This releases the edit lock so another edit may be started on the same key.

Throws:
IOException

abortUnlessCommitted

public void abortUnlessCommitted()