net.tsz.afinal.common
类 DiskLruCache.Editor

java.lang.Object
  继承者 net.tsz.afinal.common.DiskLruCache.Editor
包容类:
DiskLruCache

public final class DiskLruCache.Editor
extends java.lang.Object

Edits the values for an entry.


方法摘要
 void abort()
          Aborts this edit.
 void commit()
          Commits this edit so it is visible to readers.
 java.lang.String getString(int index)
          Returns the last committed value as a string, or null if no value has been committed.
 java.io.InputStream newInputStream(int index)
          Returns an unbuffered input stream to read the last committed value, or null if no value has been committed.
 java.io.OutputStream newOutputStream(int index)
          Returns a new unbuffered output stream to write the value at index.
 void set(int index, java.lang.String value)
          Sets the value at index to value.
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

newInputStream

public java.io.InputStream newInputStream(int index)
                                   throws java.io.IOException
Returns an unbuffered input stream to read the last committed value, or null if no value has been committed.

抛出:
java.io.IOException

getString

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

抛出:
java.io.IOException

newOutputStream

public java.io.OutputStream newOutputStream(int index)
                                     throws java.io.IOException
Returns a new unbuffered output stream to write the value at 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.

抛出:
java.io.IOException

set

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

抛出:
java.io.IOException

commit

public void commit()
            throws java.io.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.

抛出:
java.io.IOException

abort

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

抛出:
java.io.IOException