Tabnine Logo
LruDiskCache.initCache
Code IndexAdd Tabnine to your IDE (free)

How to use
initCache
method
in
com.nostra13.universalimageloader.cache.disc.impl.ext.LruDiskCache

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

origin: nostra13/Android-Universal-Image-Loader

initCache(cacheDir, reserveCacheDir, cacheMaxSize, cacheMaxFileCount);
origin: nostra13/Android-Universal-Image-Loader

private void initCache(File cacheDir, File reserveCacheDir, long cacheMaxSize, int cacheMaxFileCount)
    throws IOException {
  try {
    cache = DiskLruCache.open(cacheDir, 1, 1, cacheMaxSize, cacheMaxFileCount);
  } catch (IOException e) {
    L.e(e);
    if (reserveCacheDir != null) {
      initCache(reserveCacheDir, null, cacheMaxSize, cacheMaxFileCount);
    }
    if (cache == null) {
      throw e; //new RuntimeException("Can't initialize disk cache", e);
    }
  }
}
origin: nostra13/Android-Universal-Image-Loader

@Override
public void clear() {
  try {
    cache.delete();
  } catch (IOException e) {
    L.e(e);
  }
  try {
    initCache(cache.getDirectory(), reserveCacheDir, cache.getMaxSize(), cache.getMaxFileCount());
  } catch (IOException e) {
    L.e(e);
  }
}
origin: com.nostra13.universalimageloader/universal-image-loader

initCache(cacheDir, reserveCacheDir, cacheMaxSize, cacheMaxFileCount);
origin: wanliyang1990/WliveTV

initCache(cacheDir, reserveCacheDir, cacheMaxSize, cacheMaxFileCount);
origin: jiangqqlmj/Android-Universal-Image-Loader-Modify

this.fileNameGenerator = fileNameGenerator;
initCache(cacheDir, reserveCacheDir, cacheMaxSize, cacheMaxFileCount);
origin: com.nostra13.universalimageloader/universal-image-loader

private void initCache(File cacheDir, File reserveCacheDir, long cacheMaxSize, int cacheMaxFileCount)
    throws IOException {
  try {
    cache = DiskLruCache.open(cacheDir, 1, 1, cacheMaxSize, cacheMaxFileCount);
  } catch (IOException e) {
    L.e(e);
    if (reserveCacheDir != null) {
      initCache(reserveCacheDir, null, cacheMaxSize, cacheMaxFileCount);
    }
    if (cache == null) {
      throw e; //new RuntimeException("Can't initialize disk cache", e);
    }
  }
}
origin: wanliyang1990/WliveTV

private void initCache(File cacheDir, File reserveCacheDir, long cacheMaxSize, int cacheMaxFileCount)
    throws IOException {
  try {
    cache = DiskLruCache.open(cacheDir, 1, 1, cacheMaxSize, cacheMaxFileCount);
  } catch (IOException e) {
    L.e(e);
    if (reserveCacheDir != null) {
      initCache(reserveCacheDir, null, cacheMaxSize, cacheMaxFileCount);
    }
    if (cache == null) {
      throw e; //new RuntimeException("Can't initialize disk cache", e);
    }
  }
}
origin: jiangqqlmj/Android-Universal-Image-Loader-Modify

/**
 * 初始化本地文件 图片缓存器
 * @param cacheDir          图片缓存路径
 * @param reserveCacheDir     备用图片缓存路径
 * @param cacheMaxSize        最大缓存大小
 * @param cacheMaxFileCount    最大缓存图片数量
 * @throws IOException
 */
private void initCache(File cacheDir, File reserveCacheDir, long cacheMaxSize, int cacheMaxFileCount)
    throws IOException {
  try {
    cache = DiskLruCache.open(cacheDir, 1, 1, cacheMaxSize, cacheMaxFileCount);
  } catch (IOException e) {
    L.e(e);
    if (reserveCacheDir != null) {
      initCache(reserveCacheDir, null, cacheMaxSize, cacheMaxFileCount);
    }
    if (cache == null) {
      throw e; //new RuntimeException("Can't initialize disk cache", e);
    }
  }
}
origin: com.nostra13.universalimageloader/universal-image-loader

@Override
public void clear() {
  try {
    cache.delete();
  } catch (IOException e) {
    L.e(e);
  }
  try {
    initCache(cache.getDirectory(), reserveCacheDir, cache.getMaxSize(), cache.getMaxFileCount());
  } catch (IOException e) {
    L.e(e);
  }
}
origin: wanliyang1990/WliveTV

@Override
public void clear() {
  try {
    cache.delete();
  } catch (IOException e) {
    L.e(e);
  }
  try {
    initCache(cache.getDirectory(), reserveCacheDir, cache.getMaxSize(), cache.getMaxFileCount());
  } catch (IOException e) {
    L.e(e);
  }
}
origin: jiangqqlmj/Android-Universal-Image-Loader-Modify

/**
 * 进行清除缓存数据
 */
@Override
public void clear() {
  try {
    cache.delete();
  } catch (IOException e) {
    L.e(e);
  }
  try {
    //这边重新初始化缓存器   缓存器中文件为空
    initCache(cache.getDirectory(), reserveCacheDir, cache.getMaxSize(), cache.getMaxFileCount());
  } catch (IOException e) {
    L.e(e);
  }
}
com.nostra13.universalimageloader.cache.disc.impl.extLruDiskCacheinitCache

Javadoc

初始化本地文件 图片缓存器

Popular methods of LruDiskCache

  • <init>
  • getKey

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • JPanel (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Option (scala)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now