Codota Logo
DiskLruCache.deleteIfExists
Code IndexAdd Codota to your IDE (free)

How to use
deleteIfExists
method
in
com.nostra13.universalimageloader.cache.disc.impl.ext.DiskLruCache

Best Java code snippets using com.nostra13.universalimageloader.cache.disc.impl.ext.DiskLruCache.deleteIfExists (Showing top 12 results out of 315)

  • Common ways to obtain DiskLruCache
private void myMethod () {
DiskLruCache d =
  • Codota IconFile directory;new DiskLruCache(directory, appVersion, valueCount, maxSize, maxFileCount)
  • Codota IconFile directory;DiskLruCache.open(directory, int1, int2, maxSize, maxFileCount)
  • Smart code suggestions by Codota
}
origin: nostra13/Android-Universal-Image-Loader

private static void renameTo(File from, File to, boolean deleteDestination) throws IOException {
  if (deleteDestination) {
    deleteIfExists(to);
  }
  if (!from.renameTo(to)) {
    throw new IOException();
  }
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * Computes the initial size and collects garbage as a part of opening the
 * cache. Dirty entries are assumed to be inconsistent and will be deleted.
 */
private void processJournal() throws IOException {
  deleteIfExists(journalFileTmp);
  for (Iterator<Entry> i = lruEntries.values().iterator(); i.hasNext(); ) {
    Entry entry = i.next();
    if (entry.currentEditor == null) {
      for (int t = 0; t < valueCount; t++) {
        size += entry.lengths[t];
        fileCount++;
      }
    } else {
      entry.currentEditor = null;
      for (int t = 0; t < valueCount; t++) {
        deleteIfExists(entry.getCleanFile(t));
        deleteIfExists(entry.getDirtyFile(t));
      }
      i.remove();
    }
  }
}
origin: nostra13/Android-Universal-Image-Loader

deleteIfExists(dirty);
origin: com.nostra13.universalimageloader/universal-image-loader

private static void renameTo(File from, File to, boolean deleteDestination) throws IOException {
  if (deleteDestination) {
    deleteIfExists(to);
  }
  if (!from.renameTo(to)) {
    throw new IOException();
  }
}
origin: jiangqqlmj/Android-Universal-Image-Loader-Modify

private static void renameTo(File from, File to, boolean deleteDestination) throws IOException {
  if (deleteDestination) {
    deleteIfExists(to);
  }
  if (!from.renameTo(to)) {
    throw new IOException();
  }
}
origin: wanliyang1990/WliveTV

private static void renameTo(File from, File to, boolean deleteDestination) throws IOException {
  if (deleteDestination) {
    deleteIfExists(to);
  }
  if (!from.renameTo(to)) {
    throw new IOException();
  }
}
origin: com.nostra13.universalimageloader/universal-image-loader

/**
 * Computes the initial size and collects garbage as a part of opening the
 * cache. Dirty entries are assumed to be inconsistent and will be deleted.
 */
private void processJournal() throws IOException {
  deleteIfExists(journalFileTmp);
  for (Iterator<Entry> i = lruEntries.values().iterator(); i.hasNext(); ) {
    Entry entry = i.next();
    if (entry.currentEditor == null) {
      for (int t = 0; t < valueCount; t++) {
        size += entry.lengths[t];
        fileCount++;
      }
    } else {
      entry.currentEditor = null;
      for (int t = 0; t < valueCount; t++) {
        deleteIfExists(entry.getCleanFile(t));
        deleteIfExists(entry.getDirtyFile(t));
      }
      i.remove();
    }
  }
}
origin: wanliyang1990/WliveTV

/**
 * Computes the initial size and collects garbage as a part of opening the
 * cache. Dirty entries are assumed to be inconsistent and will be deleted.
 */
private void processJournal() throws IOException {
  deleteIfExists(journalFileTmp);
  for (Iterator<Entry> i = lruEntries.values().iterator(); i.hasNext(); ) {
    Entry entry = i.next();
    if (entry.currentEditor == null) {
      for (int t = 0; t < valueCount; t++) {
        size += entry.lengths[t];
        fileCount++;
      }
    } else {
      entry.currentEditor = null;
      for (int t = 0; t < valueCount; t++) {
        deleteIfExists(entry.getCleanFile(t));
        deleteIfExists(entry.getDirtyFile(t));
      }
      i.remove();
    }
  }
}
origin: jiangqqlmj/Android-Universal-Image-Loader-Modify

/**
 * Computes the initial size and collects garbage as a part of opening the
 * cache. Dirty entries are assumed to be inconsistent and will be deleted.
 */
private void processJournal() throws IOException {
  deleteIfExists(journalFileTmp);
  for (Iterator<Entry> i = lruEntries.values().iterator(); i.hasNext(); ) {
    Entry entry = i.next();
    if (entry.currentEditor == null) {
      for (int t = 0; t < valueCount; t++) {
        size += entry.lengths[t];
        fileCount++;
      }
    } else {
      entry.currentEditor = null;
      for (int t = 0; t < valueCount; t++) {
        deleteIfExists(entry.getCleanFile(t));
        deleteIfExists(entry.getDirtyFile(t));
      }
      i.remove();
    }
  }
}
origin: com.nostra13.universalimageloader/universal-image-loader

deleteIfExists(dirty);
origin: jiangqqlmj/Android-Universal-Image-Loader-Modify

deleteIfExists(dirty);
origin: wanliyang1990/WliveTV

deleteIfExists(dirty);
com.nostra13.universalimageloader.cache.disc.impl.extDiskLruCachedeleteIfExists

Popular methods of DiskLruCache

  • <init>
  • checkNotClosed
  • close
    Closes this cache. Stored values will remain on the filesystem.
  • delete
    Closes the cache and deletes all of its stored values. This will delete all files in the cache direc
  • edit
  • get
    Returns a snapshot of the entry named key, or null if it doesn't exist is not currently readable. If
  • getDirectory
    Returns the directory where this cache stores its data.
  • getMaxFileCount
    Returns the maximum number of files that this cache should store
  • getMaxSize
    Returns the maximum number of bytes that this cache should use to store its data.
  • journalRebuildRequired
    We only rebuild the journal when it will halve the size of the journal and eliminate at least 2000 o
  • open
    Opens the cache in directory, creating a cache if none exists there.
  • processJournal
    Computes the initial size and collects garbage as a part of opening the cache. Dirty entries are ass
  • open,
  • processJournal,
  • readJournal,
  • readJournalLine,
  • rebuildJournal,
  • remove,
  • renameTo,
  • trimToFileCount,
  • trimToSize

Popular in Java

  • Start an intent from android
  • getContentResolver (Context)
  • orElseThrow (Optional)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now