master ba33ec64d0da cached
129 files
569.5 KB
145.2k tokens
919 symbols
1 requests
Download .txt
Showing preview only (615K chars total). Download the full file or copy to clipboard to get everything.
Repository: nostra13/Android-Universal-Image-Loader
Branch: master
Commit: ba33ec64d0da
Files: 129
Total size: 569.5 KB

Directory structure:
gitextract_mm0i5r2z/

├── .github/
│   └── workflows/
│       └── gradle-wrapper-validation.yml
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── LICENSE
├── README.md
├── build.gradle
├── downloads/
│   ├── universal-image-loader-1.9.5-javadoc.jar
│   ├── universal-image-loader-1.9.5-sources.jar
│   └── universal-image-loader-1.9.5.jar
├── gradle/
│   ├── maven_push.gradle
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── library/
│   ├── build.gradle
│   ├── gradle.properties
│   ├── project.properties
│   └── src/
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   └── java/
│       │       └── com/
│       │           └── nostra13/
│       │               └── universalimageloader/
│       │                   ├── cache/
│       │                   │   ├── disc/
│       │                   │   │   ├── DiskCache.java
│       │                   │   │   ├── impl/
│       │                   │   │   │   ├── BaseDiskCache.java
│       │                   │   │   │   ├── LimitedAgeDiskCache.java
│       │                   │   │   │   ├── UnlimitedDiskCache.java
│       │                   │   │   │   └── ext/
│       │                   │   │   │       ├── DiskLruCache.java
│       │                   │   │   │       ├── LruDiskCache.java
│       │                   │   │   │       ├── StrictLineReader.java
│       │                   │   │   │       └── Util.java
│       │                   │   │   └── naming/
│       │                   │   │       ├── FileNameGenerator.java
│       │                   │   │       ├── HashCodeFileNameGenerator.java
│       │                   │   │       └── Md5FileNameGenerator.java
│       │                   │   └── memory/
│       │                   │       ├── BaseMemoryCache.java
│       │                   │       ├── LimitedMemoryCache.java
│       │                   │       ├── MemoryCache.java
│       │                   │       └── impl/
│       │                   │           ├── FIFOLimitedMemoryCache.java
│       │                   │           ├── FuzzyKeyMemoryCache.java
│       │                   │           ├── LRULimitedMemoryCache.java
│       │                   │           ├── LargestLimitedMemoryCache.java
│       │                   │           ├── LimitedAgeMemoryCache.java
│       │                   │           ├── LruMemoryCache.java
│       │                   │           ├── UsingFreqLimitedMemoryCache.java
│       │                   │           └── WeakMemoryCache.java
│       │                   ├── core/
│       │                   │   ├── DefaultConfigurationFactory.java
│       │                   │   ├── DisplayBitmapTask.java
│       │                   │   ├── DisplayImageOptions.java
│       │                   │   ├── ImageLoader.java
│       │                   │   ├── ImageLoaderConfiguration.java
│       │                   │   ├── ImageLoaderEngine.java
│       │                   │   ├── ImageLoadingInfo.java
│       │                   │   ├── LoadAndDisplayImageTask.java
│       │                   │   ├── ProcessAndDisplayImageTask.java
│       │                   │   ├── assist/
│       │                   │   │   ├── ContentLengthInputStream.java
│       │                   │   │   ├── FailReason.java
│       │                   │   │   ├── FlushedInputStream.java
│       │                   │   │   ├── ImageScaleType.java
│       │                   │   │   ├── ImageSize.java
│       │                   │   │   ├── LoadedFrom.java
│       │                   │   │   ├── QueueProcessingType.java
│       │                   │   │   ├── ViewScaleType.java
│       │                   │   │   └── deque/
│       │                   │   │       ├── BlockingDeque.java
│       │                   │   │       ├── Deque.java
│       │                   │   │       ├── LIFOLinkedBlockingDeque.java
│       │                   │   │       └── LinkedBlockingDeque.java
│       │                   │   ├── decode/
│       │                   │   │   ├── BaseImageDecoder.java
│       │                   │   │   ├── ImageDecoder.java
│       │                   │   │   └── ImageDecodingInfo.java
│       │                   │   ├── display/
│       │                   │   │   ├── BitmapDisplayer.java
│       │                   │   │   ├── CircleBitmapDisplayer.java
│       │                   │   │   ├── FadeInBitmapDisplayer.java
│       │                   │   │   ├── RoundedBitmapDisplayer.java
│       │                   │   │   ├── RoundedVignetteBitmapDisplayer.java
│       │                   │   │   └── SimpleBitmapDisplayer.java
│       │                   │   ├── download/
│       │                   │   │   ├── BaseImageDownloader.java
│       │                   │   │   └── ImageDownloader.java
│       │                   │   ├── imageaware/
│       │                   │   │   ├── ImageAware.java
│       │                   │   │   ├── ImageViewAware.java
│       │                   │   │   ├── NonViewAware.java
│       │                   │   │   └── ViewAware.java
│       │                   │   ├── listener/
│       │                   │   │   ├── ImageLoadingListener.java
│       │                   │   │   ├── ImageLoadingProgressListener.java
│       │                   │   │   ├── PauseOnScrollListener.java
│       │                   │   │   └── SimpleImageLoadingListener.java
│       │                   │   └── process/
│       │                   │       └── BitmapProcessor.java
│       │                   └── utils/
│       │                       ├── DiskCacheUtils.java
│       │                       ├── ImageSizeUtils.java
│       │                       ├── IoUtils.java
│       │                       ├── L.java
│       │                       ├── MemoryCacheUtils.java
│       │                       └── StorageUtils.java
│       └── test/
│           └── java/
│               └── com/
│                   └── nostra13/
│                       └── universalimageloader/
│                           └── core/
│                               ├── assist/
│                               │   └── ImageSizeTest.java
│                               └── download/
│                                   └── BaseImageDownloaderTest.java
├── sample/
│   ├── build.gradle
│   ├── gradle.properties
│   ├── project.properties
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── nostra13/
│           │           └── universalimageloader/
│           │               └── sample/
│           │                   ├── Constants.java
│           │                   ├── UILApplication.java
│           │                   ├── activity/
│           │                   │   ├── ComplexImageActivity.java
│           │                   │   ├── HomeActivity.java
│           │                   │   └── SimpleImageActivity.java
│           │                   ├── ext/
│           │                   │   ├── Base64ImageDownloader.java
│           │                   │   ├── BrokenJpegImageDecoder.java
│           │                   │   ├── HttpClientImageDownloader.java
│           │                   │   ├── OkHttpImageDownloader.java
│           │                   │   └── OldRoundedBitmapDisplayer.java
│           │                   ├── fragment/
│           │                   │   ├── AbsListViewBaseFragment.java
│           │                   │   ├── BaseFragment.java
│           │                   │   ├── ImageGalleryFragment.java
│           │                   │   ├── ImageGridFragment.java
│           │                   │   ├── ImageListFragment.java
│           │                   │   └── ImagePagerFragment.java
│           │                   └── widget/
│           │                       └── UILWidgetProvider.java
│           └── res/
│               ├── layout/
│               │   ├── ac_complex.xml
│               │   ├── ac_home.xml
│               │   ├── fr_image_gallery.xml
│               │   ├── fr_image_grid.xml
│               │   ├── fr_image_list.xml
│               │   ├── fr_image_pager.xml
│               │   ├── item_gallery_image.xml
│               │   ├── item_grid_image.xml
│               │   ├── item_list_image.xml
│               │   ├── item_pager_image.xml
│               │   └── widget.xml
│               ├── menu/
│               │   └── main_menu.xml
│               ├── values/
│               │   ├── strings.xml
│               │   └── styles.xml
│               ├── values-v11/
│               │   └── styles.xml
│               └── xml/
│                   └── widget_provider.xml
└── settings.gradle

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/workflows/gradle-wrapper-validation.yml
================================================
name: "Validate Gradle Wrapper"
on: [push, pull_request]

jobs:
  validation:
    name: "Validation"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: gradle/wrapper-validation-action@v1


================================================
FILE: .gitignore
================================================
# Android generated
bin/
gen/

# Ant
build.xml
local.properties

# Maven
target/
pom.xml.*
release.properties

# Eclipse
.classpath
.project
.externalToolBuilders/

# IntelliJ
*.iml
*.ipr
*.iws
.idea/
out/

# Mac 
.DS_Store

# Ignore gradle files
.gradle/
build/

# Private
signing.properties

================================================
FILE: .travis.yml
================================================
sudo: false
language: android
android:
  components:
    - platform-tools
    - tools
    - build-tools-28.0.3
    - android-28
    - extra


================================================
FILE: CHANGELOG.md
================================================
Change Log
===

v1.9.5 *(27.11.2015)*
---
 * **New API:**
   * `ImageLoader.displayImage(..., ImageSize targetImageSize, ...)`
 * CircleBitmapDisplayer
 * Better rendering of scaled images.
 * Fixed bugs:
   * inPurgeable and inInputShareable causes file descriptor leak on KitKat ([#1020](https://github.com/nostra13/Android-Universal-Image-Loader/issues/1020))
   * markSupported() ([#1026](https://github.com/nostra13/Android-Universal-Image-Loader/issues/1026))

v1.9.4 *(29.05.2015)*
---
 * **New API:**
   * `ImageLoader.setDefaultLoadingListener(ImageLoadingListener)`
 * "Disc -> Disk" migration (deleted DiscCacheAware, MemoryCacheAware)
 * Video thumbnails support (`file://...`)
 * Fixed 0-length files problem

v1.9.3 *(06.09.2014)*
---
 * Introduced `ImageScaleType.NONE_SAFE`
 * Video thumbnails support (`content://...`)
 * Animated drawables support (for `.showImageOnLoading()`, `.showImageOnFail()`, `.showImageForEmptyUri()`)
 * Fixed bugs:
   * `loadImageSync(...)` bug ([#636](https://github.com/nostra13/Android-Universal-Image-Loader/issues/636))
   * NPE if no free space while init disk cache
   * "Bitmap too large ..." for all ImageScaleTypes
   * contacts photo considering

v1.9.2 *(24.05.2014)*
---
 * New Disk cache API (preparing renaming `disc` -> `disk`)
 * ImageLoader can be called out of the Main thread. Callback will be delivered on separate thread.
 * Prevented broken image files (#511)
 * Interrupt non-actual tasks
 * `LruDiscCache` is default limited cache
 * Renaming: `ImageNonViewAware` -> `NonViewAware`. Extracted `ViewAware` from `ImageViewAware`.
 * Introduced `DiskCache` and `MemoryCache` interfaces instead of deprecated `DiscCacheAware` and `MemoryCacheAware`.
 * Removed `LimitedDiscCache`, `TotalSizeLimitedDiscCache`, `FileCountLimitedDiscCache`. Use `LruDisckCache` instead.

v1.9.1 *(27.12.2013)*
---
 * **Changed API:**
   * `BitmapDisplayer.display(...) : Bitmap` -> `BitmapDisplayer.display(...) : void`
 * **New API:**
   * Added possibility to listen image loading progress by listener - `ImageLoadingProgressListener`
 * Non-actual downloads are interrupted (if loaded less than 75%)
 * Re-designed `RoundedBitmapDisplayer`. Added `RoundedVignetteBitmapDisplayer`.
   **NOTE:** New `RoundedBitmapDisplayer`'s behaviour can vary from old one. Also consider ["RoundedImageView" project](https://github.com/vinc3m1/RoundedImageView) for usage if new `RoundedBitmapDisplayer` doesn't work for you.
 * Maximum GL texture size is considered while decode images ([#281](https://github.com/nostra13/Android-Universal-Image-Loader/issues/281))
 * `loadImage(...)` call cancels previous task for the same image URI ([#475](https://github.com/nostra13/Android-Universal-Image-Loader/issues/475))
 * Fixed StrictMode warning `Explicit termination method 'close' not called` ([#482](https://github.com/nostra13/Android-Universal-Image-Loader/issues/482))
 * `LruMemoryCache` is default memory cache for Android < 2.3 too.

v1.9.0 *(27.11.2013)*
---
 * **Changed API:**
   * `BitmapDisplayer.display(..., ImageView, ...)` -> `BitmapDisplayer.display(..., ImageAware, ...)`
 * **New API:**
   * `ImageAware`
   * `ImageLoader.displayImage(..., ImageAware, ...)`
   * `ImageLoader.loadImageSync(...) : Bitmap` for synchronous loading of image
   * `DisplayImageOptions.considerExifParams(boolean)`
   * `DisplayImageOptions.showImageOnLoading(...)` (instead of `.showStubImage(...)`)
 * `ImageLoader` can process any view (or any other object) which implements `ImageAware` interface. E.g. `ImageViewAware` is adapter of `ImageView` for `ImageAware`
 * EXIF parameters of image are not considered by default anymore. Use new API to enable it.
 * Optimized image loading (prevented double-request on image loading, reuse existing stream)
 * Fixed bugs:
   * `loadImage(...)` bug (frequent `onLoadingCancelled()`) ([#356](https://github.com/nostra13/Android-Universal-Image-Loader/issues/356))
   * Prevented NPE if `Context.getCacheDir()` returns `null` ([#392](https://github.com/nostra13/Android-Universal-Image-Loader/issues/392))

v1.8.6 *(25.07.2013)*
---
 * **Changed API:** `ImageLoaderConfiguration.enableLogging()` -> `ImageLoaderConfiguration.writeDebugLogs()`
 * **Fixed memory leak** ([#263](https://github.com/nostra13/Android-Universal-Image-Loader/issues/263))
 * Added the bug of `loadImage(...)` method (`onLoadingCancelled()` is fired always) :) 

v1.8.5 *(30.06.2013)*
---
 * **Changed API:** `ImageLoaderConfiguration.discCacheExtraOptions(...)` -> `ImageLoaderConfiguration.discCacheExtraOptions(..., BitmapProcessor)` ([#314](https://github.com/nostra13/Android-Universal-Image-Loader/issues/314))
 * **New API:**
   * `ImageLoaderConfiguration.memoryCacheSizePercentage(int)` ([#279](https://github.com/nostra13/Android-Universal-Image-Loader/issues/279))
   * `DisplayImageOptions.cacheInMemory(boolean)`, `.cacheOnDisc(boolean)`, `.resetViewBeforeLoading(boolean)` ([#252](https://github.com/nostra13/Android-Universal-Image-Loader/issues/252))
 * Added `LoadedFrom` flag to `BitmapDisplayer.display(..., LoadedFrom)` about image source  ([#149](https://github.com/nostra13/Android-Universal-Image-Loader/issues/149), [#239](https://github.com/nostra13/Android-Universal-Image-Loader/issues/239))
 * Added `L.disableLogging()` and `L.enableLogging()` to off/on logs completely ([#270](https://github.com/nostra13/Android-Universal-Image-Loader/issues/270))
 * Prevent image decoding if image is reused ([#247](https://github.com/nostra13/Android-Universal-Image-Loader/issues/247))
 * Not set cache dir on SD card if no appropriate permission ([#311](https://github.com/nostra13/Android-Universal-Image-Loader/issues/311))
 * Increased buffer size for image downloads (8 KB -> 32 KB) ([#249](https://github.com/nostra13/Android-Universal-Image-Loader/issues/249))
 * Fixed bugs:
   * Prevent recycling of cached in memory images ([#259](https://github.com/nostra13/Android-Universal-Image-Loader/issues/259))
   * ConcurrentModificationException in `LruMemoryCache` ([#265](https://github.com/nostra13/Android-Universal-Image-Loader/issues/265))
   * File counting if cached files disappeared `LimitedDiscCache` ([#316](https://github.com/nostra13/Android-Universal-Image-Loader/issues/316))    
   * NPE for ImageView without LayoutParams ([#272](https://github.com/nostra13/Android-Universal-Image-Loader/issues/272))
   * NPE in `LoadAndDisplayImageTask` ([#271](https://github.com/nostra13/Android-Universal-Image-Loader/issues/271))
   * NPE in ImageLoaderEngine ([#301](https://github.com/nostra13/Android-Universal-Image-Loader/issues/301))
   * RoundedBitmapDisplayer doesn't display round corner correctly for CENTER_CROP ([#315](https://github.com/nostra13/Android-Universal-Image-Loader/issues/315))

v1.8.4 *(13.04.2013)*
---
 * Travis CI, added Unit tests ([#189](https://github.com/nostra13/Android-Universal-Image-Loader/issues/189))
 * **New API:** `DisplayImageOptions.handler(Handler)` ([#231](https://github.com/nostra13/Android-Universal-Image-Loader/issues/231))
 * Fixed bugs:
   * `ConcurrentModificationException` in `BaseMemoryCache` ([#229](https://github.com/nostra13/Android-Universal-Image-Loader/issues/229))
   * `NullPointerException` in `LimitedDiscCache` ([#234](https://github.com/nostra13/Android-Universal-Image-Loader/issues/234))
   * `NullPointerException` in `LruMemoryCache` ([#233](https://github.com/nostra13/Android-Universal-Image-Loader/issues/233))
 * Improved work with Strings on UI thread ([#244](https://github.com/nostra13/Android-Universal-Image-Loader/issues/244))

v1.8.3 *(31.03.2013)*
---
 * Android 2.0+ support
 * Added EXIF orientation support ([#172](https://github.com/nostra13/Android-Universal-Image-Loader/issues/172))
 * **New API:** 
   * `ImageLoaderConfiguration.imageDecoder(ImageDecoder)`
   * `DisplayImageOptions.decodingOptions(BitmapFactory.Options)`
 * Handled disc cache non-availability
 * Use `LruMemoryCache` as default memory cache for API >= 9, `LRULimitedMemoryCache` - for API < 9. Default memory cache size - 1/8 of available app memory.
 * Improved `LimitedDiscCache` and `FuzzyKeyMemoryCache` performance
 * Fixed bugs:
    * `.denyCacheImageMultipleSizesInMemory` doesn't work if own memory cache is set
	* `java.lang.NoSuchMethodError` in sample app ([#206](https://github.com/nostra13/Android-Universal-Image-Loader/issues/206))

v1.8.2 *(13.03.2013)*
---
 * **Changed API:**
   * `ImageDownloader.getStream***(URI, ...)` -> `ImageDownloader.getStream***(String, ...)`
   * Made `FailReason` as a class instead of enum. Can be used in switches: `FailReason.getType()`
   * Removed `ImageLoader.offOutOfMemoryHandling()`. ImageLoader doesn't handle OutOfMemoryError by default anymore (but still catches it for callbacks).
 * **New API:**
   * `ImageLoader.taskExecutor(Executor)` and `ImageLoader.taskExecutorForCachedImages(Executor)` ([#187](https://github.com/nostra13/Android-Universal-Image-Loader/issues/187))
   * `ImageLoader.destroy()`
 * Handled SD card unmount ([#170](https://github.com/nostra13/Android-Universal-Image-Loader/issues/170))
 * Added `Scheme` class
 * Fixed bugs:
   * problem of loading of local files with encoded symbols in path ([#179](https://github.com/nostra13/Android-Universal-Image-Loader/issues/179))
   * minor mistake in `getImageSizeScaleTo()` method ([#200](https://github.com/nostra13/Android-Universal-Image-Loader/issues/200))
   * possible concurrency issue in memory caches ([#116](https://github.com/nostra13/Android-Universal-Image-Loader/issues/116))
   * wrong visibility of methods `ImageLoader.denyNetworkDownloads(boolean)` and `ImageLoader.handleSlowNetworks(boolean)` 

v1.8.1 *(08.03.2013)*
---
 * **Changed API:**
   * `ImageLoader.denyNetworkDownloads()` -> `ImageLoader.denyNetworkDownloads(true)`
   * `ImageLoader.allowNetworkDownloads()` -> `ImageLoader.denyNetworkDownloads(false)`
 * **New API:** 
   * `ImageLoader.denyNetworkDownloads(boolean)`
   * `ImageLoader.handleSlowNetwork(boolean)`. `FlushedInsputStream` isn't used for downloads by default.
 * Handled HTTP(S) redirects
 * Added `LruMemoryCache` (based on Android's LruCache), uses only strong references.
 * Fixed `DisplayImageOptions.cloneFrom(...)` ([#173](https://github.com/nostra13/Android-Universal-Image-Loader/issues/173))
 * Fixed ConcurrentModification issue in `MemoryCacheUtil. findCacheKeysForImageUri(...)` ([#174](https://github.com/nostra13/Android-Universal-Image-Loader/issues/174))
 * Fixed issue "Disc Cache can't find image by URI with special/local UTF-8 characters"
 * Improved calculation of target image size to scale (consider measured View width and height)

v1.8.0 *(10.02.2013)*
---
 * **Changed API:**
   * Signatures:
     * `ImageLoader.loadImage(Context, ...)` -> `ImageLoader.loadImage(...)`
     * `ImageDownloader.getStream(URI)` -> `ImageDownloader.getStream(URI, Object)` ([#150](https://github.com/nostra13/Android-Universal-Image-Loader/issues/150))
	 * `ImageLoadingListener.onLoading***(...)` -> `ImageLoadingListener.onLoading***(String, View, ...)` ([#130](https://github.com/nostra13/Android-Universal-Image-Loader/issues/130))
     * Constructor `PauseOnScrollListener(...)` -> `PauseOnScrollListener(ImageLoader, ...)`
   * `ImageDownloader` became interface, `URLConnectionImageDownloader` + `ExtendedImageDownloader` -> `BaseImageDownloader`
   * Renaming: `FileUtil` -> `IoUtil`
   * Removed deprecated `ImageScaleType.POWER_OF_2` and `ImageScaleType.EXACT` 
 * Support of "content://", "assets://", "drawable://" URI schemes out of the box ([#162](https://github.com/nostra13/Android-Universal-Image-Loader/issues/162))
 * **New API:** 
   * `DisplayImageOptions.showImageOnFail(int)`
   * `DisplayImageOptions.preProcessor(BitmapProcessor)` and `DisplayImageOptions.postProcessor(BitmapProcessor)` ([#151](https://github.com/nostra13/Android-Universal-Image-Loader/issues/151))
   * `DisplayImageOptions.extraForDownloader(Object)`, allows to pass auxiliary object which will be passed to `ImageDownloader.getStream(URI, Object)` ([#150](https://github.com/nostra13/Android-Universal-Image-Loader/issues/150))
   * `ImageLoader.denyNetworkDownloads()` and `ImageLoader.allowNetworkDownloads()` ([#148](https://github.com/nostra13/Android-Universal-Image-Loader/issues/148))
   * `FailReason.UNSUPPORTED_URI_SCHEME` and `FailReason.NETWORK_DENIED`
   * `ImageScaleType.NONE`
 * Added `DiscCacheUtil`
 * Prepared ImageLoader to be extandable for creation of multiple instances ([#158](https://github.com/nostra13/Android-Universal-Image-Loader/issues/158))
 * Fixed bug "Images aren't loaded after "Clear Cache" in app info" ([#168](https://github.com/nostra13/Android-Universal-Image-Loader/issues/168))
 * Switched to Apache 2.0 license

v1.7.1 *(31.01.2013)*
---
 * Avoid I/O operations on the main thread, prevented ANR ([#129](https://github.com/nostra13/Android-Universal-Image-Loader/issues/129), [#154](https://github.com/nostra13/Android-Universal-Image-Loader/issues/154))
 * Correctly handled every ImageView's scale type in `RoundedBitmapDisplayer` ([#70](https://github.com/nostra13/Android-Universal-Image-Loader/issues/70))
 * Prevented slow precaching modified date in LimitedAgeDiscCache constructor (for large number of images in cache) ([#141](https://github.com/nostra13/Android-Universal-Image-Loader/issues/141))
 * **New API:** `ImageLoader.isInited()` method. Throw IllegalStateException on `displayImage(...)`, `loadImage(...)`, `getMemoryCache()`, `clearMemoryCache()`, `getDiscCache()`, `clearDiscCache()` calls if ImageLoader isn't inited with config.
 * Closed OutputStream after Bitmap compressing ([#115](https://github.com/nostra13/Android-Universal-Image-Loader/issues/115))
 * Sample: Refactored resources

v1.7.0 *(27.11.2012)*
---
 * Maven support
 * **New API:** 
   * `ImageLoader.pause()` and `ImageLoader.resume()` ([#106](https://github.com/nostra13/Android-Universal-Image-Loader/issues/106))
   * `PauseOnScrollListener` (instead of `OnScrollSmartOptions`) for convenient pause/resume ImageLoader on scroll/fling in list views ([#106](https://github.com/nostra13/Android-Universal-Image-Loader/issues/106))
 * Prevented consuming of lot of memory by cacheKeysForImageViews ([#108](https://github.com/nostra13/Android-Universal-Image-Loader/issues/108))

v1.6.4 *(20.11.2012)*
---
 * **New API:** 
   * `DisplayImageOptions.bitmapConfig(Bitmap.Config)` ([#101](https://github.com/nostra13/Android-Universal-Image-Loader/issues/101))
   * `DisplayImageOptions.delayBeforeLoading(int)` ([#103](https://github.com/nostra13/Android-Universal-Image-Loader/issues/103))
   * `OnScrollSmartOptions` for convenient control of loading delay on fling in ListViews, GridViews
 * Added `FadeInBitmapDisplayer`
 * Prevented recycling of using Bitmap ([#101](https://github.com/nostra13/Android-Universal-Image-Loader/issues/101))

v1.6.3 *(03.11.2012)*
---
 * **New API:** `ImageLoaderConfiguration.tasksProcessingOrder(QueueProcessingType)` ([#89](https://github.com/nostra13/Android-Universal-Image-Loader/issues/89))
 * Added `MemoryCacheUtil` for work with memory cache
 * Fixed calculation of size the original image is needed scale to ([#93](https://github.com/nostra13/Android-Universal-Image-Loader/issues/93))
 * Allowed to create multiple `ImageLoader` instances ([#92](https://github.com/nostra13/Android-Universal-Image-Loader/issues/92))

v1.6.2 *(28.10.2012)*
---
 * Prevented showing wrong bitmap in reused view ([#85](https://github.com/nostra13/Android-Universal-Image-Loader/issues/85))
 * Fixed bug "double displaying" if image is cached in memory
 * Prevented "MissingFormatWidthException" ([#88](https://github.com/nostra13/Android-Universal-Image-Loader/issues/88))

v1.6.1 *(02.10.2012)*
---
 * **Changed API:** Renaming:
   * `ImageScaleType.POWER_OF_2` -> `IN_SAMPLE_POWER_OF_2`
   * `ImageScaleType.EXACT` -> `IN_SAMPLE_INT`
 * **New API:** `ImageScaleType.EXACTLY` and `ImageScaleType.EXACTLY_STRETCHED`
 * Prevented `ImageLoadingListener` callbacks firing and displaying image in view after ImageLoader was stopped
 * Fixed bug of calculation of original image scale for decoding

v1.6.0 *(29.09.2012)*
---
 * **New API:** `ImageLoader.loadImage(...)` which loads image, decodes it to Bitmap and returns Bitmap in callback ([#51](https://github.com/nostra13/Android-Universal-Image-Loader/issues/51))
 * Avoided unnecessary image downloads ([#44](https://github.com/nostra13/Android-Universal-Image-Loader/issues/44))

v1.5.6 *(20.09.2012)*
---
 * **Changed API:** Changed `FileNameGenerator` to interface (instead of abstract class)
 * **New API:** `BitmapDisplayer` and `DisplayImageOptions.displayer(...)`
 * Multithread displaying of cached images (instead of single-thread)
 * Correctly handle UTF-8 symbols and spaces in image URL ([#31](https://github.com/nostra13/Android-Universal-Image-Loader/issues/31))

v1.5.5 *(18.08.2012)*
---
 * **Changed API:**
   * Removed `DisplayImageOptions.transform()`
   * Changed `FileNameGenerator` to abstract class (instead of interface)
 * Fire `ImageLoadingListener` callbacks if image URI is null


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

================================================
FILE: README.md
================================================
# ![Logo](https://github.com/nostra13/Android-Universal-Image-Loader/raw/master/sample/src/main/res/drawable-mdpi/ic_launcher.png) Universal Image Loader [![Build Status](https://travis-ci.org/nostra13/Android-Universal-Image-Loader.svg?branch=master)](https://travis-ci.org/nostra13/Android-Universal-Image-Loader) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.nostra13.universalimageloader/universal-image-loader/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.nostra13.universalimageloader/universal-image-loader)

The great ancestor of modern image-loading libraries :)  
UIL aims to provide a powerful, flexible and highly customizable instrument for image loading, caching and displaying. It provides a lot of configuration options and good control over the image loading and caching process.

![Screenshot](https://github.com/nostra13/Android-Universal-Image-Loader/raw/master/UniversalImageLoader.png)

## Project News 
 * Really have no time for development... so I stop project maintaining since Nov 27 :(
 * UIL [27.11.2011 - 27.11.2015]
 * Thanks to all developers for your support :)

## Features
 * Multi-thread image loading (async or sync)
 * Wide customization of ImageLoader's configuration (thread executors, downloader, decoder, memory and disk cache, display image options, etc.)
 * Many customization options for every display image call (stub images, caching switch, decoding options, Bitmap processing and displaying, etc.)
 * Image caching in memory and/or on disk (device's file system or SD card)
 * Listening loading process (including downloading progress)

Android 4.1+ support

## Downloads
 * **[universal-image-loader-1.9.5.jar](https://github.com/nostra13/Android-Universal-Image-Loader/raw/master/downloads/universal-image-loader-1.9.5.jar)**
 * [<img src="https://play.google.com/intl/en_us/badges/images/apps/en-play-badge.png" height="45px" />](https://play.google.com/store/apps/details?id=com.nostra13.universalimageloader.sample) [![QR Code](https://lh3.ggpht.com/csXEddxiLgQ6FxckefjQnP1PVugbaAYOdcuTa3vVtGV1PlWbFu2dYggoH8rI1w2RdEz1=w50)](http://chart.apis.google.com/chart?chs=300x300&cht=qr&chld=|1&chl=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.nostra13.universalimageloader.sample) [<img src="https://www.javatpoint.com/fullformpages/images/apk.png" height="45px" />](https://github.com/nostra13/Android-Universal-Image-Loader/raw/master/downloads/universal-image-loader-sample-1.9.5.apk)

## [Documentation](https://github.com/nostra13/Android-Universal-Image-Loader/wiki)
 * **[Quick Setup](https://github.com/nostra13/Android-Universal-Image-Loader/wiki/Quick-Setup)**
 * **[Configuration](https://github.com/nostra13/Android-Universal-Image-Loader/wiki/Configuration)**
 * **[Display Options](https://github.com/nostra13/Android-Universal-Image-Loader/wiki/Display-Options)**
 * [Useful Info](https://github.com/nostra13/Android-Universal-Image-Loader/wiki/Useful-Info) - Read it before asking a question
 * [User Support](https://github.com/nostra13/Android-Universal-Image-Loader/wiki/User-Support) - Read it before creating new issue
 * [Sample project](https://github.com/nostra13/Android-Universal-Image-Loader/tree/master/sample) - Learn it to understand the right way of library usage
 * [ChangeLog](https://github.com/nostra13/Android-Universal-Image-Loader/blob/master/CHANGELOG.md) - Info about API changes is here

## Usage

### Dependency

```
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
```

### Acceptable URIs examples
``` java
"http://site.com/image.png" // from Web
"file:///mnt/sdcard/image.png" // from SD card
"file:///mnt/sdcard/video.mp4" // from SD card (video thumbnail)
"content://media/external/images/media/13" // from content provider
"content://media/external/video/media/13" // from content provider (video thumbnail)
"assets://image.png" // from assets
"drawable://" + R.drawable.img // from drawables (non-9patch images)
```
**NOTE:** Use `drawable://` only if you really need it! Always **consider the native way** to load drawables - `ImageView.setImageResource(...)` instead of using of `ImageLoader`.

### Simple
``` java
ImageLoader imageLoader = ImageLoader.getInstance(); // Get singleton instance
```
``` java
// Load image, decode it to Bitmap and display Bitmap in ImageView (or any other view 
//	which implements ImageAware interface)
imageLoader.displayImage(imageUri, imageView);
```
``` java
// Load image, decode it to Bitmap and return Bitmap to callback
imageLoader.loadImage(imageUri, new SimpleImageLoadingListener() {
	@Override
	public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
		// Do whatever you want with Bitmap
	}
});
```
``` java
// Load image, decode it to Bitmap and return Bitmap synchronously
Bitmap bmp = imageLoader.loadImageSync(imageUri);
```

### Complete
``` java
// Load image, decode it to Bitmap and display Bitmap in ImageView (or any other view 
//	which implements ImageAware interface)
imageLoader.displayImage(imageUri, imageView, options, new ImageLoadingListener() {
	@Override
	public void onLoadingStarted(String imageUri, View view) {
		...
	}
	@Override
	public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
		...
	}
	@Override
	public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
		...
	}
	@Override
	public void onLoadingCancelled(String imageUri, View view) {
		...
	}
}, new ImageLoadingProgressListener() {
	@Override
	public void onProgressUpdate(String imageUri, View view, int current, int total) {
		...
	}
});
```
``` java
// Load image, decode it to Bitmap and return Bitmap to callback
ImageSize targetSize = new ImageSize(80, 50); // result Bitmap will be fit to this size
imageLoader.loadImage(imageUri, targetSize, options, new SimpleImageLoadingListener() {
	@Override
	public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
		// Do whatever you want with Bitmap
	}
});
```
``` java
// Load image, decode it to Bitmap and return Bitmap synchronously
ImageSize targetSize = new ImageSize(80, 50); // result Bitmap will be fit to this size
Bitmap bmp = imageLoader.loadImageSync(imageUri, targetSize, options);
```

## Load & Display Task Flow
![Task Flow](https://github.com/nostra13/Android-Universal-Image-Loader/raw/master/wiki/UIL_Flow.png)


## Applications using Universal Image Loader
**[MediaHouse, UPnP/DLNA Browser](https://play.google.com/store/apps/details?id=com.dbapp.android.mediahouse)** | **[Prezzi Benzina (AndroidFuel)](https://play.google.com/store/apps/details?id=org.vernazza.androidfuel)** | **[ROM Toolbox Lite](https://play.google.com/store/apps/details?id=com.jrummy.liberty.toolbox)**, [Pro](https://play.google.com/store/apps/details?id=com.jrummy.liberty.toolboxpro) | [Stadium Astro](https://play.google.com/store/apps/details?id=com.astro.stadium.activities) | [Chef Astro](https://play.google.com/store/apps/details?id=com.sencha.test) | [Sporee - Live Soccer Scores](https://play.google.com/store/apps/details?id=com.sporee.android) | **[EyeEm - Photo Filter Camera](https://play.google.com/store/apps/details?id=com.baseapp.eyeem)** | **[Topface - meeting is easy](https://play.google.com/store/apps/details?id=com.topface.topface)** | **[reddit is fun](https://play.google.com/store/apps/details?id=com.andrewshu.android.reddit)** | **[Diaro - personal diary](https://play.google.com/store/apps/details?id=com.pixelcrater.Diaro)** | **[Meetup](https://play.google.com/store/apps/details?id=com.meetup)** | [Vingle - Magazines by Fans](https://play.google.com/store/apps/details?id=com.vingle.android) | [Anime Music Radio](https://play.google.com/store/apps/details?id=com.maxxt.animeradio) | [WidgetLocker Theme Viewer](https://play.google.com/store/apps/details?id=com.companionfree.WLThemeViewer) | [ShortBlogger for Tumblr](https://play.google.com/store/apps/details?id=com.luckydroid.tumblelog) | [SnapDish Food Camera](https://play.google.com/store/apps/details?id=com.vuzz.snapdish) | **[Twitch](https://play.google.com/store/apps/details?id=tv.twitch.android.viewer)** | [TVShow Time, TV show guide](https://play.google.com/store/apps/details?id=com.tozelabs.tvshowtime) | [Planning Center Services](https://play.google.com/store/apps/details?id=com.ministrycentered.PlanningCenter) | **[Lapse It](https://play.google.com/store/apps/details?id=com.ui.LapseIt)** | [My Cloud Player for SoundCloud](https://play.google.com/store/apps/details?id=com.mycloudplayers.mycloudplayer) | **[SoundTracking](https://play.google.com/store/apps/details?id=com.schematiclabs.soundtracking)** | [LoopLR Social Video](https://play.google.com/store/apps/details?id=com.looplr) | [Hír24](https://play.google.com/store/apps/details?id=hu.sanomamedia.hir24) | **[Immobilien Scout24](https://play.google.com/store/apps/details?id=de.is24.android)** | **[Lieferheld - Pizza Pasta Sushi](https://play.google.com/store/apps/details?id=de.lieferheld.android)** | [Loocator: free sex datings](https://play.google.com/store/apps/details?id=com.ivicode.loocator) | [벨팡-개편 이벤트,컬러링,벨소리,무료,최신가요,링투유](https://play.google.com/store/apps/details?id=com.mediahubs.www) | [Streambels AirPlay/DLNA Player](https://play.google.com/store/apps/details?id=com.tuxera.streambels) | [Ship Mate - All Cruise Lines](https://play.google.com/store/apps/details?id=shipmate.carnival) | [Disk & Storage Analyzer](https://play.google.com/store/apps/details?id=com.mobile_infographics_tools.mydrive) | [糗事百科](https://play.google.com/store/apps/details?id=qsbk.app) | [Balance BY](https://play.google.com/store/apps/details?id=com.vladyud.balance) | **[Anti Theft Alarm - Security](https://play.google.com/store/apps/details?id=br.com.verde.alarme)** | **[XiiaLive™ - Internet Radio](https://play.google.com/store/apps/details?id=com.android.DroidLiveLite)** | **[Bandsintown Concerts](https://play.google.com/store/apps/details?id=com.bandsintown)** | **[Save As Web Archive](https://play.google.com/store/apps/details?id=jp.fuukiemonster.webmemo)** | [MCPE STORE -Download MCPE file](https://play.google.com/store/apps/details?id=com.newidea.mcpestore) | **[All-In-One Toolbox (29 Tools)](http://aiotoolbox.com/)** | [Zaim](https://play.google.com/store/apps/details?id=net.zaim.android) | **[Calculator Plus Free](https://play.google.com/store/apps/details?id=com.digitalchemy.calculator.freedecimal)** | [Truedialer by Truecaller](https://play.google.com/store/apps/details?id=com.truecaller.phoneapp) | [DoggCatcher Podcast Player](https://play.google.com/store/apps/details?id=com.snoggdoggler.android.applications.doggcatcher.v1_0) | [PingTools Network Utilities](https://play.google.com/store/apps/details?id=ua.com.streamsoft.pingtools) | [The Traveler](https://play.google.com/store/apps/details?id=edu.bsu.android.apps.traveler) | [minube: travel photo album](https://play.google.com/store/apps/details?id=com.minube.app) | [Wear Store for Wear Apps](https://play.google.com/store/apps/details?id=goko.ws2) | [Cast Store for Chromecast Apps](https://play.google.com/store/apps/details?id=goko.gcs) | [WebMoney Keeper](https://play.google.com/store/apps/details?id=com.webmoney.my)

## Donation
You can support the project and thank the author for his hard work :)

* **PayPal** - nostra.uil[at]gmail[dot]com

## Alternative libraries

 * [Fresco](https://github.com/facebook/fresco)
 * [Glide](https://github.com/bumptech/glide)
 * [Picasso](https://github.com/square/picasso)
 * [Volley : ImageLoader](https://android.googlesource.com/platform/frameworks/volley/)


================================================
FILE: build.gradle
================================================
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.2'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

if (JavaVersion.current().isJava8Compatible()) {
    allprojects {
        tasks.withType(Javadoc) {
            options.addStringOption('Xdoclint:none', '-quiet')
        }
    }
}


================================================
FILE: gradle/maven_push.gradle
================================================
/*
 * Copyright 2013 Chris Banes
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

apply plugin: 'maven'
apply plugin: 'signing'

def isReleaseBuild() {
    return VERSION_NAME.contains("SNAPSHOT") == false
}

def getReleaseRepositoryUrl() {
    return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
            : "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}

def getSnapshotRepositoryUrl() {
    return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
            : "https://oss.sonatype.org/content/repositories/snapshots/"
}

def getRepositoryUsername() {
    return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : ""
}

def getRepositoryPassword() {
    return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
}

afterEvaluate { project ->
    uploadArchives {
        repositories {
            mavenDeployer {
                beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

                pom.groupId = GROUP
                pom.artifactId = POM_ARTIFACT_ID
                pom.version = VERSION_NAME

                repository(url: getReleaseRepositoryUrl()) {
                    authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
                }
                snapshotRepository(url: getSnapshotRepositoryUrl()) {
                    authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
                }

                pom.project {
                    name POM_NAME
                    packaging POM_PACKAGING
                    description POM_DESCRIPTION
                    url POM_URL

                    scm {
                        url POM_SCM_URL
                        connection POM_SCM_CONNECTION
                        developerConnection POM_SCM_DEV_CONNECTION
                    }

                    licenses {
                        license {
                            name POM_LICENCE_NAME
                            url POM_LICENCE_URL
                            distribution POM_LICENCE_DIST
                        }
                    }

                    developers {
                        developer {
                            id POM_DEVELOPER_ID
                            name POM_DEVELOPER_NAME
                        }
                    }
                }
            }
        }
    }

    task installArchives(type: Upload) {
        description "Installs the artifacts to the local Maven repository."
        configuration = configurations['archives']
        repositories {
            mavenDeployer {
                pom.groupId = GROUP
                pom.artifactId = POM_ARTIFACT_ID
                pom.version = VERSION_NAME

                repository url: "file://${System.properties['user.home']}/.m2/repository"
            }
        }
    }

    signing {
        required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
        sign configurations.archives
    }

    task androidJavadocs(type: Javadoc) {
        source = android.sourceSets.main.java.srcDirs
	    options {
            encoding = "UTF-8"
	    }
        classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
    }

    task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
        classifier = 'javadoc'
        from androidJavadocs.destinationDir
    }

    task androidSourcesJar(type: Jar) {
        classifier = 'sources'
        from android.sourceSets.main.java.srcDirs
    }

    artifacts {
        archives androidSourcesJar
        archives androidJavadocsJar
    }
}


================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
#Tue Apr 23 15:38:19 MSK 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip


================================================
FILE: gradle.properties
================================================
org.gradle.daemon=true

VERSION_NAME=1.9.5
VERSION_COE=40
GROUP=com.nostra13.universalimageloader

POM_DESCRIPTION=Powerful and flexible instrument for asynchronous image loading, caching and displaying on Android
POM_URL=https://github.com/nostra13/Android-Universal-Image-Loader
POM_SCM_URL=https://github.com/nostra13/Android-Universal-Image-Loader
POM_SCM_CONNECTION=scm:git@github.com:nostra13/Android-Universal-Image-Loader.git
POM_SCM_DEV_CONNECTION=scm:git@github.com:nostra13/Android-Universal-Image-Loader.git
POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=nostra13
POM_DEVELOPER_NAME=Sergey Tarasevich



================================================
FILE: gradlew
================================================
#!/usr/bin/env bash

##############################################################################
##
##  Gradle start up script for UN*X
##
##############################################################################

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
    echo "$*"
}

die ( ) {
    echo
    echo "$*"
    echo
    exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
  CYGWIN* )
    cygwin=true
    ;;
  Darwin* )
    darwin=true
    ;;
  MINGW* )
    msys=true
    ;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`"/$link"
    fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
    else
        JAVACMD="$JAVA_HOME/bin/java"
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD="java"
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
    MAX_FD_LIMIT=`ulimit -H -n`
    if [ $? -eq 0 ] ; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
            MAX_FD="$MAX_FD_LIMIT"
        fi
        ulimit -n $MAX_FD
        if [ $? -ne 0 ] ; then
            warn "Could not set maximum file descriptor limit: $MAX_FD"
        fi
    else
        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
    fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

    # We build the pattern for arguments to be converted via cygpath
    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
    SEP=""
    for dir in $ROOTDIRSRAW ; do
        ROOTDIRS="$ROOTDIRS$SEP$dir"
        SEP="|"
    done
    OURCYGPATTERN="(^($ROOTDIRS))"
    # Add a user-defined pattern to the cygpath arguments
    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
    fi
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    i=0
    for arg in "$@" ; do
        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option

        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
        else
            eval `echo args$i`="\"$arg\""
        fi
        i=$((i+1))
    done
    case $i in
        (0) set -- ;;
        (1) set -- "$args0" ;;
        (2) set -- "$args0" "$args1" ;;
        (3) set -- "$args0" "$args1" "$args2" ;;
        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
    esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
    JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"


================================================
FILE: gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega


================================================
FILE: library/build.gradle
================================================
apply plugin: 'com.android.library'

android {
    compileSdkVersion 28
    buildToolsVersion "28.0.3"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 40
        versionName "1.9.5"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    testImplementation 'junit:junit:4.12'
    testImplementation 'org.robolectric:robolectric:3.0-rc3'
    testImplementation 'com.squareup.assertj:assertj-android:1.0.0'
}


// build a jar with source files
task sourcesJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier = 'sources'
}
artifacts {
    archives sourcesJar
}

// Build a jar file in addition to the default aar file
android.libraryVariants.all { variant ->
    def name = variant.buildType.name
    def task = project.tasks.create "jar${name.capitalize()}", Jar
    task.dependsOn variant.javaCompile
    task.from variant.javaCompile.destinationDir
    artifacts.add('archives', task);
}

apply from: '../gradle/maven_push.gradle'


================================================
FILE: library/gradle.properties
================================================
POM_NAME=Universal Image Loader Library
POM_ARTIFACT_ID=universal-image-loader
POM_PACKAGING=jar


================================================
FILE: library/project.properties
================================================
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.

# Project target.
target=android-21
android.library=true


================================================
FILE: library/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.nostra13.universalimageloader"/>


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/DiskCache.java
================================================
/*******************************************************************************
 * Copyright 2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.disc;

import android.graphics.Bitmap;
import com.nostra13.universalimageloader.utils.IoUtils;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

/**
 * Interface for disk cache
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.9.2
 */
public interface DiskCache {
	/**
	 * Returns root directory of disk cache
	 *
	 * @return Root directory of disk cache
	 */
	File getDirectory();

	/**
	 * Returns file of cached image
	 *
	 * @param imageUri Original image URI
	 * @return File of cached image or <b>null</b> if image wasn't cached
	 */
	File get(String imageUri);

	/**
	 * Saves image stream in disk cache.
	 * Incoming image stream shouldn't be closed in this method.
	 *
	 * @param imageUri    Original image URI
	 * @param imageStream Input stream of image (shouldn't be closed in this method)
	 * @param listener    Listener for saving progress, can be ignored if you don't use
	 *                    {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener
	 *                    progress listener} in ImageLoader calls
	 * @return <b>true</b> - if image was saved successfully; <b>false</b> - if image wasn't saved in disk cache.
	 * @throws java.io.IOException
	 */
	boolean save(String imageUri, InputStream imageStream, IoUtils.CopyListener listener) throws IOException;

	/**
	 * Saves image bitmap in disk cache.
	 *
	 * @param imageUri Original image URI
	 * @param bitmap   Image bitmap
	 * @return <b>true</b> - if bitmap was saved successfully; <b>false</b> - if bitmap wasn't saved in disk cache.
	 * @throws IOException
	 */
	boolean save(String imageUri, Bitmap bitmap) throws IOException;

	/**
	 * Removes image file associated with incoming URI
	 *
	 * @param imageUri Image URI
	 * @return <b>true</b> - if image file is deleted successfully; <b>false</b> - if image file doesn't exist for
	 * incoming URI or image file can't be deleted.
	 */
	boolean remove(String imageUri);

	/** Closes disk cache, releases resources. */
	void close();

	/** Clears disk cache. */
	void clear();
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/BaseDiskCache.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.disc.impl;

import android.graphics.Bitmap;
import com.nostra13.universalimageloader.cache.disc.DiskCache;
import com.nostra13.universalimageloader.cache.disc.naming.FileNameGenerator;
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory;
import com.nostra13.universalimageloader.utils.IoUtils;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * Base disk cache.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @see FileNameGenerator
 * @since 1.0.0
 */
public abstract class BaseDiskCache implements DiskCache {
	/** {@value} */
	public static final int DEFAULT_BUFFER_SIZE = 32 * 1024; // 32 Kb
	/** {@value} */
	public static final Bitmap.CompressFormat DEFAULT_COMPRESS_FORMAT = Bitmap.CompressFormat.PNG;
	/** {@value} */
	public static final int DEFAULT_COMPRESS_QUALITY = 100;

	private static final String ERROR_ARG_NULL = " argument must be not null";
	private static final String TEMP_IMAGE_POSTFIX = ".tmp";

	protected final File cacheDir;
	protected final File reserveCacheDir;

	protected final FileNameGenerator fileNameGenerator;

	protected int bufferSize = DEFAULT_BUFFER_SIZE;

	protected Bitmap.CompressFormat compressFormat = DEFAULT_COMPRESS_FORMAT;
	protected int compressQuality = DEFAULT_COMPRESS_QUALITY;

	/** @param cacheDir Directory for file caching */
	public BaseDiskCache(File cacheDir) {
		this(cacheDir, null);
	}

	/**
	 * @param cacheDir        Directory for file caching
	 * @param reserveCacheDir null-ok; Reserve directory for file caching. It's used when the primary directory isn't available.
	 */
	public BaseDiskCache(File cacheDir, File reserveCacheDir) {
		this(cacheDir, reserveCacheDir, DefaultConfigurationFactory.createFileNameGenerator());
	}

	/**
	 * @param cacheDir          Directory for file caching
	 * @param reserveCacheDir   null-ok; Reserve directory for file caching. It's used when the primary directory isn't available.
	 * @param fileNameGenerator {@linkplain com.nostra13.universalimageloader.cache.disc.naming.FileNameGenerator
	 *                          Name generator} for cached files
	 */
	public BaseDiskCache(File cacheDir, File reserveCacheDir, FileNameGenerator fileNameGenerator) {
		if (cacheDir == null) {
			throw new IllegalArgumentException("cacheDir" + ERROR_ARG_NULL);
		}
		if (fileNameGenerator == null) {
			throw new IllegalArgumentException("fileNameGenerator" + ERROR_ARG_NULL);
		}

		this.cacheDir = cacheDir;
		this.reserveCacheDir = reserveCacheDir;
		this.fileNameGenerator = fileNameGenerator;
	}

	@Override
	public File getDirectory() {
		return cacheDir;
	}

	@Override
	public File get(String imageUri) {
		return getFile(imageUri);
	}

	@Override
	public boolean save(String imageUri, InputStream imageStream, IoUtils.CopyListener listener) throws IOException {
		File imageFile = getFile(imageUri);
		File tmpFile = new File(imageFile.getAbsolutePath() + TEMP_IMAGE_POSTFIX);
		boolean loaded = false;
		try {
			OutputStream os = new BufferedOutputStream(new FileOutputStream(tmpFile), bufferSize);
			try {
				loaded = IoUtils.copyStream(imageStream, os, listener, bufferSize);
			} finally {
				IoUtils.closeSilently(os);
			}
		} finally {
			if (loaded && !tmpFile.renameTo(imageFile)) {
				loaded = false;
			}
			if (!loaded) {
				tmpFile.delete();
			}
		}
		return loaded;
	}

	@Override
	public boolean save(String imageUri, Bitmap bitmap) throws IOException {
		File imageFile = getFile(imageUri);
		File tmpFile = new File(imageFile.getAbsolutePath() + TEMP_IMAGE_POSTFIX);
		OutputStream os = new BufferedOutputStream(new FileOutputStream(tmpFile), bufferSize);
		boolean savedSuccessfully = false;
		try {
			savedSuccessfully = bitmap.compress(compressFormat, compressQuality, os);
		} finally {
			IoUtils.closeSilently(os);
			if (savedSuccessfully && !tmpFile.renameTo(imageFile)) {
				savedSuccessfully = false;
			}
			if (!savedSuccessfully) {
				tmpFile.delete();
			}
		}
		bitmap.recycle();
		return savedSuccessfully;
	}

	@Override
	public boolean remove(String imageUri) {
		return getFile(imageUri).delete();
	}

	@Override
	public void close() {
		// Nothing to do
	}

	@Override
	public void clear() {
		File[] files = cacheDir.listFiles();
		if (files != null) {
			for (File f : files) {
				f.delete();
			}
		}
	}

	/** Returns file object (not null) for incoming image URI. File object can reference to non-existing file. */
	protected File getFile(String imageUri) {
		String fileName = fileNameGenerator.generate(imageUri);
		File dir = cacheDir;
		if (!cacheDir.exists() && !cacheDir.mkdirs()) {
			if (reserveCacheDir != null && (reserveCacheDir.exists() || reserveCacheDir.mkdirs())) {
				dir = reserveCacheDir;
			}
		}
		return new File(dir, fileName);
	}

	public void setBufferSize(int bufferSize) {
		this.bufferSize = bufferSize;
	}

	public void setCompressFormat(Bitmap.CompressFormat compressFormat) {
		this.compressFormat = compressFormat;
	}

	public void setCompressQuality(int compressQuality) {
		this.compressQuality = compressQuality;
	}
}

================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/LimitedAgeDiskCache.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.disc.impl;

import android.graphics.Bitmap;
import com.nostra13.universalimageloader.cache.disc.naming.FileNameGenerator;
import com.nostra13.universalimageloader.core.DefaultConfigurationFactory;
import com.nostra13.universalimageloader.utils.IoUtils;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * Cache which deletes files which were loaded more than defined time. Cache size is unlimited.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.3.1
 */
public class LimitedAgeDiskCache extends BaseDiskCache {

	private final long maxFileAge;

	private final Map<File, Long> loadingDates = Collections.synchronizedMap(new HashMap<File, Long>());

	/**
	 * @param cacheDir Directory for file caching
	 * @param maxAge   Max file age (in seconds). If file age will exceed this value then it'll be removed on next
	 *                 treatment (and therefore be reloaded).
	 */
	public LimitedAgeDiskCache(File cacheDir, long maxAge) {
		this(cacheDir, null, DefaultConfigurationFactory.createFileNameGenerator(), maxAge);
	}

	/**
	 * @param cacheDir Directory for file caching
	 * @param maxAge   Max file age (in seconds). If file age will exceed this value then it'll be removed on next
	 *                 treatment (and therefore be reloaded).
	 */
	public LimitedAgeDiskCache(File cacheDir, File reserveCacheDir, long maxAge) {
		this(cacheDir, reserveCacheDir, DefaultConfigurationFactory.createFileNameGenerator(), maxAge);
	}

	/**
	 * @param cacheDir          Directory for file caching
	 * @param reserveCacheDir   null-ok; Reserve directory for file caching. It's used when the primary directory isn't available.
	 * @param fileNameGenerator Name generator for cached files
	 * @param maxAge            Max file age (in seconds). If file age will exceed this value then it'll be removed on next
	 *                          treatment (and therefore be reloaded).
	 */
	public LimitedAgeDiskCache(File cacheDir, File reserveCacheDir, FileNameGenerator fileNameGenerator, long maxAge) {
		super(cacheDir, reserveCacheDir, fileNameGenerator);
		this.maxFileAge = maxAge * 1000; // to milliseconds
	}

	@Override
	public File get(String imageUri) {
		File file = super.get(imageUri);
		if (file != null && file.exists()) {
			boolean cached;
			Long loadingDate = loadingDates.get(file);
			if (loadingDate == null) {
				cached = false;
				loadingDate = file.lastModified();
			} else {
				cached = true;
			}

			if (System.currentTimeMillis() - loadingDate > maxFileAge) {
				file.delete();
				loadingDates.remove(file);
			} else if (!cached) {
				loadingDates.put(file, loadingDate);
			}
		}
		return file;
	}

	@Override
	public boolean save(String imageUri, InputStream imageStream, IoUtils.CopyListener listener) throws IOException {
		boolean saved = super.save(imageUri, imageStream, listener);
		rememberUsage(imageUri);
		return saved;
	}

	@Override
	public boolean save(String imageUri, Bitmap bitmap) throws IOException {
		boolean saved = super.save(imageUri, bitmap);
		rememberUsage(imageUri);
		return saved;
	}

	@Override
	public boolean remove(String imageUri) {
		loadingDates.remove(getFile(imageUri));
		return super.remove(imageUri);
	}

	@Override
	public void clear() {
		super.clear();
		loadingDates.clear();
	}

	private void rememberUsage(String imageUri) {
		File file = getFile(imageUri);
		long currentTime = System.currentTimeMillis();
		file.setLastModified(currentTime);
		loadingDates.put(file, currentTime);
	}
}

================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/UnlimitedDiskCache.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.disc.impl;

import com.nostra13.universalimageloader.cache.disc.naming.FileNameGenerator;

import java.io.File;

/**
 * Default implementation of {@linkplain com.nostra13.universalimageloader.cache.disc.DiskCache disk cache}.
 * Cache size is unlimited.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.0.0
 */
public class UnlimitedDiskCache extends BaseDiskCache {
	/** @param cacheDir Directory for file caching */
	public UnlimitedDiskCache(File cacheDir) {
		super(cacheDir);
	}

	/**
	 * @param cacheDir        Directory for file caching
	 * @param reserveCacheDir null-ok; Reserve directory for file caching. It's used when the primary directory isn't available.
	 */
	public UnlimitedDiskCache(File cacheDir, File reserveCacheDir) {
		super(cacheDir, reserveCacheDir);
	}

	/**
	 * @param cacheDir          Directory for file caching
	 * @param reserveCacheDir   null-ok; Reserve directory for file caching. It's used when the primary directory isn't available.
	 * @param fileNameGenerator {@linkplain com.nostra13.universalimageloader.cache.disc.naming.FileNameGenerator
	 *                          Name generator} for cached files
	 */
	public UnlimitedDiskCache(File cacheDir, File reserveCacheDir, FileNameGenerator fileNameGenerator) {
		super(cacheDir, reserveCacheDir, fileNameGenerator);
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/ext/DiskLruCache.java
================================================
/*
 * Copyright (C) 2011 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.nostra13.universalimageloader.cache.disc.impl.ext;

import java.io.BufferedWriter;
import java.io.Closeable;
import java.io.EOFException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * A cache that uses a bounded amount of space on a filesystem. Each cache
 * entry has a string key and a fixed number of values. Each key must match
 * the regex <strong>[a-z0-9_-]{1,64}</strong>. Values are byte sequences,
 * accessible as streams or files. Each value must be between {@code 0} and
 * {@code Integer.MAX_VALUE} bytes in length.
 *
 * <p>The cache stores its data in a directory on the filesystem. This
 * directory must be exclusive to the cache; the cache may delete or overwrite
 * files from its directory. It is an error for multiple processes to use the
 * same cache directory at the same time.
 *
 * <p>This cache limits the number of bytes that it will store on the
 * filesystem. When the number of stored bytes exceeds the limit, the cache will
 * remove entries in the background until the limit is satisfied. The limit is
 * not strict: the cache may temporarily exceed it while waiting for files to be
 * deleted. The limit does not include filesystem overhead or the cache
 * journal so space-sensitive applications should set a conservative limit.
 *
 * <p>Clients call {@link #edit} to create or update the values of an entry. An
 * entry may have only one editor at one time; if a value is not available to be
 * edited then {@link #edit} will return null.
 * <ul>
 * <li>When an entry is being <strong>created</strong> it is necessary to
 * supply a full set of values; the empty value should be used as a
 * placeholder if necessary.
 * <li>When an entry is being <strong>edited</strong>, it is not necessary
 * to supply data for every value; values default to their previous
 * value.
 * </ul>
 * Every {@link #edit} call must be matched by a call to {@link Editor#commit}
 * or {@link Editor#abort}. Committing is atomic: a read observes the full set
 * of values as they were before or after the commit, but never a mix of values.
 *
 * <p>Clients call {@link #get} to read a snapshot of an entry. The read will
 * observe the value at the time that {@link #get} was called. Updates and
 * removals after the call do not impact ongoing reads.
 *
 * <p>This class is tolerant of some I/O errors. If files are missing from the
 * filesystem, the corresponding entries will be dropped from the cache. If
 * an error occurs while writing a cache value, the edit will fail silently.
 * Callers should handle other problems by catching {@code IOException} and
 * responding appropriately.
 */
final class DiskLruCache implements Closeable {
	static final String JOURNAL_FILE = "journal";
	static final String JOURNAL_FILE_TEMP = "journal.tmp";
	static final String JOURNAL_FILE_BACKUP = "journal.bkp";
	static final String MAGIC = "libcore.io.DiskLruCache";
	static final String VERSION_1 = "1";
	static final long ANY_SEQUENCE_NUMBER = -1;
	static final Pattern LEGAL_KEY_PATTERN = Pattern.compile("[a-z0-9_-]{1,64}");
	private static final String CLEAN = "CLEAN";
	private static final String DIRTY = "DIRTY";
	private static final String REMOVE = "REMOVE";
	private static final String READ = "READ";

    /*
     * This cache uses a journal file named "journal". A typical journal file
     * looks like this:
     *     libcore.io.DiskLruCache
     *     1
     *     100
     *     2
     *
     *     CLEAN 3400330d1dfc7f3f7f4b8d4d803dfcf6 832 21054
     *     DIRTY 335c4c6028171cfddfbaae1a9c313c52
     *     CLEAN 335c4c6028171cfddfbaae1a9c313c52 3934 2342
     *     REMOVE 335c4c6028171cfddfbaae1a9c313c52
     *     DIRTY 1ab96a171faeeee38496d8b330771a7a
     *     CLEAN 1ab96a171faeeee38496d8b330771a7a 1600 234
     *     READ 335c4c6028171cfddfbaae1a9c313c52
     *     READ 3400330d1dfc7f3f7f4b8d4d803dfcf6
     *
     * The first five lines of the journal form its header. They are the
     * constant string "libcore.io.DiskLruCache", the disk cache's version,
     * the application's version, the value count, and a blank line.
     *
     * Each of the subsequent lines in the file is a record of the state of a
     * cache entry. Each line contains space-separated values: a state, a key,
     * and optional state-specific values.
     *   o DIRTY lines track that an entry is actively being created or updated.
     *     Every successful DIRTY action should be followed by a CLEAN or REMOVE
     *     action. DIRTY lines without a matching CLEAN or REMOVE indicate that
     *     temporary files may need to be deleted.
     *   o CLEAN lines track a cache entry that has been successfully published
     *     and may be read. A publish line is followed by the lengths of each of
     *     its values.
     *   o READ lines track accesses for LRU.
     *   o REMOVE lines track entries that have been deleted.
     *
     * The journal file is appended to as cache operations occur. The journal may
     * occasionally be compacted by dropping redundant lines. A temporary file named
     * "journal.tmp" will be used during compaction; that file should be deleted if
     * it exists when the cache is opened.
     */

	private final File directory;
	private final File journalFile;
	private final File journalFileTmp;
	private final File journalFileBackup;
	private final int appVersion;
	private long maxSize;
	private int maxFileCount;
	private final int valueCount;
	private long size = 0;
	private int fileCount = 0;
	private Writer journalWriter;
	private final LinkedHashMap<String, Entry> lruEntries =
			new LinkedHashMap<String, Entry>(0, 0.75f, true);
	private int redundantOpCount;

	/**
	 * To differentiate between old and current snapshots, each entry is given
	 * a sequence number each time an edit is committed. A snapshot is stale if
	 * its sequence number is not equal to its entry's sequence number.
	 */
	private long nextSequenceNumber = 0;

	/** This cache uses a single background thread to evict entries. */
	final ThreadPoolExecutor executorService =
			new ThreadPoolExecutor(0, 1, 60L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
	private final Callable<Void> cleanupCallable = new Callable<Void>() {
		public Void call() throws Exception {
			synchronized (DiskLruCache.this) {
				if (journalWriter == null) {
					return null; // Closed.
				}
				trimToSize();
				trimToFileCount();
				if (journalRebuildRequired()) {
					rebuildJournal();
					redundantOpCount = 0;
				}
			}
			return null;
		}
	};

	private DiskLruCache(File directory, int appVersion, int valueCount, long maxSize, int maxFileCount) {
		this.directory = directory;
		this.appVersion = appVersion;
		this.journalFile = new File(directory, JOURNAL_FILE);
		this.journalFileTmp = new File(directory, JOURNAL_FILE_TEMP);
		this.journalFileBackup = new File(directory, JOURNAL_FILE_BACKUP);
		this.valueCount = valueCount;
		this.maxSize = maxSize;
		this.maxFileCount = maxFileCount;
	}

	/**
	 * Opens the cache in {@code directory}, creating a cache if none exists
	 * there.
	 *
	 * @param directory a writable directory
	 * @param valueCount the number of values per cache entry. Must be positive.
	 * @param maxSize the maximum number of bytes this cache should use to store
	 * @param maxFileCount the maximum file count this cache should store
	 * @throws IOException if reading or writing the cache directory fails
	 */
	public static DiskLruCache open(File directory, int appVersion, int valueCount, long maxSize, int maxFileCount)
			throws IOException {
		if (maxSize <= 0) {
			throw new IllegalArgumentException("maxSize <= 0");
		}
		if (maxFileCount <= 0) {
			throw new IllegalArgumentException("maxFileCount <= 0");
		}
		if (valueCount <= 0) {
			throw new IllegalArgumentException("valueCount <= 0");
		}

		// If a bkp file exists, use it instead.
		File backupFile = new File(directory, JOURNAL_FILE_BACKUP);
		if (backupFile.exists()) {
			File journalFile = new File(directory, JOURNAL_FILE);
			// If journal file also exists just delete backup file.
			if (journalFile.exists()) {
				backupFile.delete();
			} else {
				renameTo(backupFile, journalFile, false);
			}
		}

		// Prefer to pick up where we left off.
		DiskLruCache cache = new DiskLruCache(directory, appVersion, valueCount, maxSize, maxFileCount);
		if (cache.journalFile.exists()) {
			try {
				cache.readJournal();
				cache.processJournal();
				cache.journalWriter = new BufferedWriter(
						new OutputStreamWriter(new FileOutputStream(cache.journalFile, true), Util.US_ASCII));
				return cache;
			} catch (IOException journalIsCorrupt) {
				System.out
						.println("DiskLruCache "
								+ directory
								+ " is corrupt: "
								+ journalIsCorrupt.getMessage()
								+ ", removing");
				cache.delete();
			}
		}

		// Create a new empty cache.
		directory.mkdirs();
		cache = new DiskLruCache(directory, appVersion, valueCount, maxSize, maxFileCount);
		cache.rebuildJournal();
		return cache;
	}

	private void readJournal() throws IOException {
		StrictLineReader reader = new StrictLineReader(new FileInputStream(journalFile), Util.US_ASCII);
		try {
			String magic = reader.readLine();
			String version = reader.readLine();
			String appVersionString = reader.readLine();
			String valueCountString = reader.readLine();
			String blank = reader.readLine();
			if (!MAGIC.equals(magic)
					|| !VERSION_1.equals(version)
					|| !Integer.toString(appVersion).equals(appVersionString)
					|| !Integer.toString(valueCount).equals(valueCountString)
					|| !"".equals(blank)) {
				throw new IOException("unexpected journal header: [" + magic + ", " + version + ", "
						+ valueCountString + ", " + blank + "]");
			}

			int lineCount = 0;
			while (true) {
				try {
					readJournalLine(reader.readLine());
					lineCount++;
				} catch (EOFException endOfJournal) {
					break;
				}
			}
			redundantOpCount = lineCount - lruEntries.size();
		} finally {
			Util.closeQuietly(reader);
		}
	}

	private void readJournalLine(String line) throws IOException {
		int firstSpace = line.indexOf(' ');
		if (firstSpace == -1) {
			throw new IOException("unexpected journal line: " + line);
		}

		int keyBegin = firstSpace + 1;
		int secondSpace = line.indexOf(' ', keyBegin);
		final String key;
		if (secondSpace == -1) {
			key = line.substring(keyBegin);
			if (firstSpace == REMOVE.length() && line.startsWith(REMOVE)) {
				lruEntries.remove(key);
				return;
			}
		} else {
			key = line.substring(keyBegin, secondSpace);
		}

		Entry entry = lruEntries.get(key);
		if (entry == null) {
			entry = new Entry(key);
			lruEntries.put(key, entry);
		}

		if (secondSpace != -1 && firstSpace == CLEAN.length() && line.startsWith(CLEAN)) {
			String[] parts = line.substring(secondSpace + 1).split(" ");
			entry.readable = true;
			entry.currentEditor = null;
			entry.setLengths(parts);
		} else if (secondSpace == -1 && firstSpace == DIRTY.length() && line.startsWith(DIRTY)) {
			entry.currentEditor = new Editor(entry);
		} else if (secondSpace == -1 && firstSpace == READ.length() && line.startsWith(READ)) {
			// This work was already done by calling lruEntries.get().
		} else {
			throw new IOException("unexpected journal line: " + line);
		}
	}

	/**
	 * 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();
			}
		}
	}

	/**
	 * Creates a new journal that omits redundant information. This replaces the
	 * current journal if it exists.
	 */
	private synchronized void rebuildJournal() throws IOException {
		if (journalWriter != null) {
			journalWriter.close();
		}

		Writer writer = new BufferedWriter(
				new OutputStreamWriter(new FileOutputStream(journalFileTmp), Util.US_ASCII));
		try {
			writer.write(MAGIC);
			writer.write("\n");
			writer.write(VERSION_1);
			writer.write("\n");
			writer.write(Integer.toString(appVersion));
			writer.write("\n");
			writer.write(Integer.toString(valueCount));
			writer.write("\n");
			writer.write("\n");

			for (Entry entry : lruEntries.values()) {
				if (entry.currentEditor != null) {
					writer.write(DIRTY + ' ' + entry.key + '\n');
				} else {
					writer.write(CLEAN + ' ' + entry.key + entry.getLengths() + '\n');
				}
			}
		} finally {
			writer.close();
		}

		if (journalFile.exists()) {
			renameTo(journalFile, journalFileBackup, true);
		}
		renameTo(journalFileTmp, journalFile, false);
		journalFileBackup.delete();

		journalWriter = new BufferedWriter(
				new OutputStreamWriter(new FileOutputStream(journalFile, true), Util.US_ASCII));
	}

	private static void deleteIfExists(File file) throws IOException {
		if (file.exists() && !file.delete()) {
			throw new IOException();
		}
	}

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

	/**
	 * Returns a snapshot of the entry named {@code key}, or null if it doesn't
	 * exist is not currently readable. If a value is returned, it is moved to
	 * the head of the LRU queue.
	 */
	public synchronized Snapshot get(String key) throws IOException {
		checkNotClosed();
		validateKey(key);
		Entry entry = lruEntries.get(key);
		if (entry == null) {
			return null;
		}

		if (!entry.readable) {
			return null;
		}

		// Open all streams eagerly to guarantee that we see a single published
		// snapshot. If we opened streams lazily then the streams could come
		// from different edits.
		File[] files = new File[valueCount];
		InputStream[] ins = new InputStream[valueCount];
		try {
			File file;
			for (int i = 0; i < valueCount; i++) {
				file = entry.getCleanFile(i);
				files[i] = file;
				ins[i] = new FileInputStream(file);
			}
		} catch (FileNotFoundException e) {
			// A file must have been deleted manually!
			for (int i = 0; i < valueCount; i++) {
				if (ins[i] != null) {
					Util.closeQuietly(ins[i]);
				} else {
					break;
				}
			}
			return null;
		}

		redundantOpCount++;
		journalWriter.append(READ + ' ' + key + '\n');
		if (journalRebuildRequired()) {
			executorService.submit(cleanupCallable);
		}

		return new Snapshot(key, entry.sequenceNumber, files, ins, entry.lengths);
	}

	/**
	 * Returns an editor for the entry named {@code key}, or null if another
	 * edit is in progress.
	 */
	public Editor edit(String key) throws IOException {
		return edit(key, ANY_SEQUENCE_NUMBER);
	}

	private synchronized Editor edit(String key, long expectedSequenceNumber) throws IOException {
		checkNotClosed();
		validateKey(key);
		Entry entry = lruEntries.get(key);
		if (expectedSequenceNumber != ANY_SEQUENCE_NUMBER && (entry == null
				|| entry.sequenceNumber != expectedSequenceNumber)) {
			return null; // Snapshot is stale.
		}
		if (entry == null) {
			entry = new Entry(key);
			lruEntries.put(key, entry);
		} else if (entry.currentEditor != null) {
			return null; // Another edit is in progress.
		}

		Editor editor = new Editor(entry);
		entry.currentEditor = editor;

		// Flush the journal before creating files to prevent file leaks.
		journalWriter.write(DIRTY + ' ' + key + '\n');
		journalWriter.flush();
		return editor;
	}

	/** Returns the directory where this cache stores its data. */
	public File getDirectory() {
		return directory;
	}

	/**
	 * Returns the maximum number of bytes that this cache should use to store
	 * its data.
	 */
	public synchronized long getMaxSize() {
		return maxSize;
	}

	/** Returns the maximum number of files that this cache should store */
	public synchronized int getMaxFileCount() {
		return maxFileCount;
	}

	/**
	 * Changes the maximum number of bytes the cache can store and queues a job
	 * to trim the existing store, if necessary.
	 */
	public synchronized void setMaxSize(long maxSize) {
		this.maxSize = maxSize;
		executorService.submit(cleanupCallable);
	}

	/**
	 * Returns the number of bytes currently being used to store the values in
	 * this cache. This may be greater than the max size if a background
	 * deletion is pending.
	 */
	public synchronized long size() {
		return size;
	}

	/**
	 * Returns the number of files currently being used to store the values in
	 * this cache. This may be greater than the max file count if a background
	 * deletion is pending.
	 */
	public synchronized long fileCount() {
		return fileCount;
	}

	private synchronized void completeEdit(Editor editor, boolean success) throws IOException {
		Entry entry = editor.entry;
		if (entry.currentEditor != editor) {
			throw new IllegalStateException();
		}

		// If this edit is creating the entry for the first time, every index must have a value.
		if (success && !entry.readable) {
			for (int i = 0; i < valueCount; i++) {
				if (!editor.written[i]) {
					editor.abort();
					throw new IllegalStateException("Newly created entry didn't create value for index " + i);
				}
				if (!entry.getDirtyFile(i).exists()) {
					editor.abort();
					return;
				}
			}
		}

		for (int i = 0; i < valueCount; i++) {
			File dirty = entry.getDirtyFile(i);
			if (success) {
				if (dirty.exists()) {
					File clean = entry.getCleanFile(i);
					dirty.renameTo(clean);
					long oldLength = entry.lengths[i];
					long newLength = clean.length();
					entry.lengths[i] = newLength;
					size = size - oldLength + newLength;
					fileCount++;
				}
			} else {
				deleteIfExists(dirty);
			}
		}

		redundantOpCount++;
		entry.currentEditor = null;
		if (entry.readable | success) {
			entry.readable = true;
			journalWriter.write(CLEAN + ' ' + entry.key + entry.getLengths() + '\n');
			if (success) {
				entry.sequenceNumber = nextSequenceNumber++;
			}
		} else {
			lruEntries.remove(entry.key);
			journalWriter.write(REMOVE + ' ' + entry.key + '\n');
		}
		journalWriter.flush();

		if (size > maxSize || fileCount > maxFileCount || journalRebuildRequired()) {
			executorService.submit(cleanupCallable);
		}
	}

	/**
	 * We only rebuild the journal when it will halve the size of the journal
	 * and eliminate at least 2000 ops.
	 */
	private boolean journalRebuildRequired() {
		final int redundantOpCompactThreshold = 2000;
		return redundantOpCount >= redundantOpCompactThreshold //
				&& redundantOpCount >= lruEntries.size();
	}

	/**
	 * Drops the entry for {@code key} if it exists and can be removed. Entries
	 * actively being edited cannot be removed.
	 *
	 * @return true if an entry was removed.
	 */
	public synchronized boolean remove(String key) throws IOException {
		checkNotClosed();
		validateKey(key);
		Entry entry = lruEntries.get(key);
		if (entry == null || entry.currentEditor != null) {
			return false;
		}

		for (int i = 0; i < valueCount; i++) {
			File file = entry.getCleanFile(i);
			if (file.exists() && !file.delete()) {
				throw new IOException("failed to delete " + file);
			}
			size -= entry.lengths[i];
			fileCount--;
			entry.lengths[i] = 0;
		}

		redundantOpCount++;
		journalWriter.append(REMOVE + ' ' + key + '\n');
		lruEntries.remove(key);

		if (journalRebuildRequired()) {
			executorService.submit(cleanupCallable);
		}

		return true;
	}

	/** Returns true if this cache has been closed. */
	public synchronized boolean isClosed() {
		return journalWriter == null;
	}

	private void checkNotClosed() {
		if (journalWriter == null) {
			throw new IllegalStateException("cache is closed");
		}
	}

	/** Force buffered operations to the filesystem. */
	public synchronized void flush() throws IOException {
		checkNotClosed();
		trimToSize();
		trimToFileCount();
		journalWriter.flush();
	}

	/** Closes this cache. Stored values will remain on the filesystem. */
	public synchronized void close() throws IOException {
		if (journalWriter == null) {
			return; // Already closed.
		}
		for (Entry entry : new ArrayList<Entry>(lruEntries.values())) {
			if (entry.currentEditor != null) {
				entry.currentEditor.abort();
			}
		}
		trimToSize();
		trimToFileCount();
		journalWriter.close();
		journalWriter = null;
	}

	private void trimToSize() throws IOException {
		while (size > maxSize) {
			Map.Entry<String, Entry> toEvict = lruEntries.entrySet().iterator().next();
			remove(toEvict.getKey());
		}
	}

	private void trimToFileCount() throws IOException {
		while (fileCount > maxFileCount) {
			Map.Entry<String, Entry> toEvict = lruEntries.entrySet().iterator().next();
			remove(toEvict.getKey());
		}
	}

	/**
	 * Closes the cache and deletes all of its stored values. This will delete
	 * all files in the cache directory including files that weren't created by
	 * the cache.
	 */
	public void delete() throws IOException {
		close();
		Util.deleteContents(directory);
	}

	private void validateKey(String key) {
		Matcher matcher = LEGAL_KEY_PATTERN.matcher(key);
		if (!matcher.matches()) {
			throw new IllegalArgumentException("keys must match regex [a-z0-9_-]{1,64}: \"" + key + "\"");
		}
	}

	private static String inputStreamToString(InputStream in) throws IOException {
		return Util.readFully(new InputStreamReader(in, Util.UTF_8));
	}

	/** A snapshot of the values for an entry. */
	public final class Snapshot implements Closeable {
		private final String key;
		private final long sequenceNumber;
		private File[] files;
		private final InputStream[] ins;
		private final long[] lengths;

		private Snapshot(String key, long sequenceNumber, File[] files, InputStream[] ins, long[] lengths) {
			this.key = key;
			this.sequenceNumber = sequenceNumber;
			this.files = files;
			this.ins = ins;
			this.lengths = lengths;
		}

		/**
		 * 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.
		 */
		public Editor edit() throws IOException {
			return DiskLruCache.this.edit(key, sequenceNumber);
		}

		/** Returns file with the value for {@code index}. */
		public File getFile(int index) {
			return files[index];
		}

		/** Returns the unbuffered stream with the value for {@code index}. */
		public InputStream getInputStream(int index) {
			return ins[index];
		}

		/** Returns the string value for {@code index}. */
		public String getString(int index) throws IOException {
			return inputStreamToString(getInputStream(index));
		}

		/** Returns the byte length of the value for {@code index}. */
		public long getLength(int index) {
			return lengths[index];
		}

		public void close() {
			for (InputStream in : ins) {
				Util.closeQuietly(in);
			}
		}
	}

	private static final OutputStream NULL_OUTPUT_STREAM = new OutputStream() {
		@Override
		public void write(int b) throws IOException {
			// Eat all writes silently. Nom nom.
		}
	};

	/** Edits the values for an entry. */
	public final class Editor {
		private final Entry entry;
		private final boolean[] written;
		private boolean hasErrors;
		private boolean committed;

		private Editor(Entry entry) {
			this.entry = entry;
			this.written = (entry.readable) ? null : new boolean[valueCount];
		}

		/**
		 * Returns an unbuffered input stream to read the last committed value,
		 * or null if no value has been committed.
		 */
		public InputStream newInputStream(int index) throws IOException {
			synchronized (DiskLruCache.this) {
				if (entry.currentEditor != this) {
					throw new IllegalStateException();
				}
				if (!entry.readable) {
					return null;
				}
				try {
					return new FileInputStream(entry.getCleanFile(index));
				} catch (FileNotFoundException e) {
					return null;
				}
			}
		}

		/**
		 * Returns the last committed value as a string, or null if no value
		 * has been committed.
		 */
		public String getString(int index) throws IOException {
			InputStream in = newInputStream(index);
			return in != null ? inputStreamToString(in) : null;
		}

		/**
		 * Returns a new unbuffered output stream to write the value at
		 * {@code index}. If the underlying output stream encounters errors
		 * when writing to the filesystem, this edit will be aborted when
		 * {@link #commit} is called. The returned output stream does not throw
		 * IOExceptions.
		 */
		public OutputStream newOutputStream(int index) throws IOException {
			synchronized (DiskLruCache.this) {
				if (entry.currentEditor != this) {
					throw new IllegalStateException();
				}
				if (!entry.readable) {
					written[index] = true;
				}
				File dirtyFile = entry.getDirtyFile(index);
				FileOutputStream outputStream;
				try {
					outputStream = new FileOutputStream(dirtyFile);
				} catch (FileNotFoundException e) {
					// Attempt to recreate the cache directory.
					directory.mkdirs();
					try {
						outputStream = new FileOutputStream(dirtyFile);
					} catch (FileNotFoundException e2) {
						// We are unable to recover. Silently eat the writes.
						return NULL_OUTPUT_STREAM;
					}
				}
				return new FaultHidingOutputStream(outputStream);
			}
		}

		/** Sets the value at {@code index} to {@code value}. */
		public void set(int index, String value) throws IOException {
			Writer writer = null;
			try {
				writer = new OutputStreamWriter(newOutputStream(index), Util.UTF_8);
				writer.write(value);
			} finally {
				Util.closeQuietly(writer);
			}
		}

		/**
		 * Commits this edit so it is visible to readers.  This releases the
		 * edit lock so another edit may be started on the same key.
		 */
		public void commit() throws IOException {
			if (hasErrors) {
				completeEdit(this, false);
				remove(entry.key); // The previous entry is stale.
			} else {
				completeEdit(this, true);
			}
			committed = true;
		}

		/**
		 * Aborts this edit. This releases the edit lock so another edit may be
		 * started on the same key.
		 */
		public void abort() throws IOException {
			completeEdit(this, false);
		}

		public void abortUnlessCommitted() {
			if (!committed) {
				try {
					abort();
				} catch (IOException ignored) {
				}
			}
		}

		private class FaultHidingOutputStream extends FilterOutputStream {
			private FaultHidingOutputStream(OutputStream out) {
				super(out);
			}

			@Override public void write(int oneByte) {
				try {
					out.write(oneByte);
				} catch (IOException e) {
					hasErrors = true;
				}
			}

			@Override public void write(byte[] buffer, int offset, int length) {
				try {
					out.write(buffer, offset, length);
				} catch (IOException e) {
					hasErrors = true;
				}
			}

			@Override public void close() {
				try {
					out.close();
				} catch (IOException e) {
					hasErrors = true;
				}
			}

			@Override public void flush() {
				try {
					out.flush();
				} catch (IOException e) {
					hasErrors = true;
				}
			}
		}
	}

	private final class Entry {
		private final String key;

		/** Lengths of this entry's files. */
		private final long[] lengths;

		/** True if this entry has ever been published. */
		private boolean readable;

		/** The ongoing edit or null if this entry is not being edited. */
		private Editor currentEditor;

		/** The sequence number of the most recently committed edit to this entry. */
		private long sequenceNumber;

		private Entry(String key) {
			this.key = key;
			this.lengths = new long[valueCount];
		}

		public String getLengths() throws IOException {
			StringBuilder result = new StringBuilder();
			for (long size : lengths) {
				result.append(' ').append(size);
			}
			return result.toString();
		}

		/** Set lengths using decimal numbers like "10123". */
		private void setLengths(String[] strings) throws IOException {
			if (strings.length != valueCount) {
				throw invalidLengths(strings);
			}

			try {
				for (int i = 0; i < strings.length; i++) {
					lengths[i] = Long.parseLong(strings[i]);
				}
			} catch (NumberFormatException e) {
				throw invalidLengths(strings);
			}
		}

		private IOException invalidLengths(String[] strings) throws IOException {
			throw new IOException("unexpected journal line: " + java.util.Arrays.toString(strings));
		}

		public File getCleanFile(int i) {
			return new File(directory, key + "." + i);
		}

		public File getDirtyFile(int i) {
			return new File(directory, key + "." + i + ".tmp");
		}
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/ext/LruDiskCache.java
================================================
/*******************************************************************************
 * Copyright 2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.disc.impl.ext;

import android.graphics.Bitmap;
import com.nostra13.universalimageloader.cache.disc.DiskCache;
import com.nostra13.universalimageloader.cache.disc.naming.FileNameGenerator;
import com.nostra13.universalimageloader.utils.IoUtils;
import com.nostra13.universalimageloader.utils.L;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * Disk cache based on "Least-Recently Used" principle. Adapter pattern, adapts
 * {@link com.nostra13.universalimageloader.cache.disc.impl.ext.DiskLruCache DiskLruCache} to
 * {@link com.nostra13.universalimageloader.cache.disc.DiskCache DiskCache}
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @see FileNameGenerator
 * @since 1.9.2
 */
public class LruDiskCache implements DiskCache {
	/** {@value */
	public static final int DEFAULT_BUFFER_SIZE = 32 * 1024; // 32 Kb
	/** {@value */
	public static final Bitmap.CompressFormat DEFAULT_COMPRESS_FORMAT = Bitmap.CompressFormat.PNG;
	/** {@value */
	public static final int DEFAULT_COMPRESS_QUALITY = 100;

	private static final String ERROR_ARG_NULL = " argument must be not null";
	private static final String ERROR_ARG_NEGATIVE = " argument must be positive number";

	protected DiskLruCache cache;
	private File reserveCacheDir;

	protected final FileNameGenerator fileNameGenerator;

	protected int bufferSize = DEFAULT_BUFFER_SIZE;

	protected Bitmap.CompressFormat compressFormat = DEFAULT_COMPRESS_FORMAT;
	protected int compressQuality = DEFAULT_COMPRESS_QUALITY;

	/**
	 * @param cacheDir          Directory for file caching
	 * @param fileNameGenerator {@linkplain com.nostra13.universalimageloader.cache.disc.naming.FileNameGenerator
	 *                          Name generator} for cached files. Generated names must match the regex
	 *                          <strong>[a-z0-9_-]{1,64}</strong>
	 * @param cacheMaxSize      Max cache size in bytes. <b>0</b> means cache size is unlimited.
	 * @throws IOException if cache can't be initialized (e.g. "No space left on device")
	 */
	public LruDiskCache(File cacheDir, FileNameGenerator fileNameGenerator, long cacheMaxSize) throws IOException {
		this(cacheDir, null, fileNameGenerator, cacheMaxSize, 0);
	}

	/**
	 * @param cacheDir          Directory for file caching
	 * @param reserveCacheDir   null-ok; Reserve directory for file caching. It's used when the primary directory isn't available.
	 * @param fileNameGenerator {@linkplain com.nostra13.universalimageloader.cache.disc.naming.FileNameGenerator
	 *                          Name generator} for cached files. Generated names must match the regex
	 *                          <strong>[a-z0-9_-]{1,64}</strong>
	 * @param cacheMaxSize      Max cache size in bytes. <b>0</b> means cache size is unlimited.
	 * @param cacheMaxFileCount Max file count in cache. <b>0</b> means file count is unlimited.
	 * @throws IOException if cache can't be initialized (e.g. "No space left on device")
	 */
	public LruDiskCache(File cacheDir, File reserveCacheDir, FileNameGenerator fileNameGenerator, long cacheMaxSize,
			int cacheMaxFileCount) throws IOException {
		if (cacheDir == null) {
			throw new IllegalArgumentException("cacheDir" + ERROR_ARG_NULL);
		}
		if (cacheMaxSize < 0) {
			throw new IllegalArgumentException("cacheMaxSize" + ERROR_ARG_NEGATIVE);
		}
		if (cacheMaxFileCount < 0) {
			throw new IllegalArgumentException("cacheMaxFileCount" + ERROR_ARG_NEGATIVE);
		}
		if (fileNameGenerator == null) {
			throw new IllegalArgumentException("fileNameGenerator" + ERROR_ARG_NULL);
		}

		if (cacheMaxSize == 0) {
			cacheMaxSize = Long.MAX_VALUE;
		}
		if (cacheMaxFileCount == 0) {
			cacheMaxFileCount = Integer.MAX_VALUE;
		}

		this.reserveCacheDir = reserveCacheDir;
		this.fileNameGenerator = fileNameGenerator;
		initCache(cacheDir, reserveCacheDir, cacheMaxSize, cacheMaxFileCount);
	}

	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);
			}
		}
	}

	@Override
	public File getDirectory() {
		return cache.getDirectory();
	}

	@Override
	public File get(String imageUri) {
		DiskLruCache.Snapshot snapshot = null;
		try {
			snapshot = cache.get(getKey(imageUri));
			return snapshot == null ? null : snapshot.getFile(0);
		} catch (IOException e) {
			L.e(e);
			return null;
		} finally {
			if (snapshot != null) {
				snapshot.close();
			}
		}
	}

	@Override
	public boolean save(String imageUri, InputStream imageStream, IoUtils.CopyListener listener) throws IOException {
		DiskLruCache.Editor editor = cache.edit(getKey(imageUri));
		if (editor == null) {
			return false;
		}

		OutputStream os = new BufferedOutputStream(editor.newOutputStream(0), bufferSize);
		boolean copied = false;
		try {
			copied = IoUtils.copyStream(imageStream, os, listener, bufferSize);
		} finally {
			IoUtils.closeSilently(os);
			if (copied) {
				editor.commit();
			} else {
				editor.abort();
			}
		}
		return copied;
	}

	@Override
	public boolean save(String imageUri, Bitmap bitmap) throws IOException {
		DiskLruCache.Editor editor = cache.edit(getKey(imageUri));
		if (editor == null) {
			return false;
		}

		OutputStream os = new BufferedOutputStream(editor.newOutputStream(0), bufferSize);
		boolean savedSuccessfully = false;
		try {
			savedSuccessfully = bitmap.compress(compressFormat, compressQuality, os);
		} finally {
			IoUtils.closeSilently(os);
		}
		if (savedSuccessfully) {
			editor.commit();
		} else {
			editor.abort();
		}
		return savedSuccessfully;
	}

	@Override
	public boolean remove(String imageUri) {
		try {
			return cache.remove(getKey(imageUri));
		} catch (IOException e) {
			L.e(e);
			return false;
		}
	}

	@Override
	public void close() {
		try {
			cache.close();
		} catch (IOException e) {
			L.e(e);
		}
		cache = null;
	}

	@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);
		}
	}

	private String getKey(String imageUri) {
		return fileNameGenerator.generate(imageUri);
	}

	public void setBufferSize(int bufferSize) {
		this.bufferSize = bufferSize;
	}

	public void setCompressFormat(Bitmap.CompressFormat compressFormat) {
		this.compressFormat = compressFormat;
	}

	public void setCompressQuality(int compressQuality) {
		this.compressQuality = compressQuality;
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/ext/StrictLineReader.java
================================================
/*
 * Copyright (C) 2012 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.nostra13.universalimageloader.cache.disc.impl.ext;

import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;

/**
 * Buffers input from an {@link InputStream} for reading lines.
 *
 * <p>This class is used for buffered reading of lines. For purposes of this class, a line ends
 * with "\n" or "\r\n". End of input is reported by throwing {@code EOFException}. Unterminated
 * line at end of input is invalid and will be ignored, the caller may use {@code
 * hasUnterminatedLine()} to detect it after catching the {@code EOFException}.
 *
 * <p>This class is intended for reading input that strictly consists of lines, such as line-based
 * cache entries or cache journal. Unlike the {@link java.io.BufferedReader} which in conjunction
 * with {@link java.io.InputStreamReader} provides similar functionality, this class uses different
 * end-of-input reporting and a more restrictive definition of a line.
 *
 * <p>This class supports only charsets that encode '\r' and '\n' as a single byte with value 13
 * and 10, respectively, and the representation of no other character contains these values.
 * We currently check in constructor that the charset is one of US-ASCII, UTF-8 and ISO-8859-1.
 * The default charset is US_ASCII.
 */
class StrictLineReader implements Closeable {
	private static final byte CR = (byte) '\r';
	private static final byte LF = (byte) '\n';

	private final InputStream in;
	private final Charset charset;

	/*
	   * Buffered data is stored in {@code buf}. As long as no exception occurs, 0 <= pos <= end
	   * and the data in the range [pos, end) is buffered for reading. At end of input, if there is
	   * an unterminated line, we set end == -1, otherwise end == pos. If the underlying
	   * {@code InputStream} throws an {@code IOException}, end may remain as either pos or -1.
	   */
	private byte[] buf;
	private int pos;
	private int end;

	/**
	 * Constructs a new {@code LineReader} with the specified charset and the default capacity.
	 *
	 * @param in the {@code InputStream} to read data from.
	 * @param charset the charset used to decode data. Only US-ASCII, UTF-8 and ISO-8859-1 are
	 * supported.
	 * @throws NullPointerException if {@code in} or {@code charset} is null.
	 * @throws IllegalArgumentException if the specified charset is not supported.
	 */
	public StrictLineReader(InputStream in, Charset charset) {
		this(in, 8192, charset);
	}

	/**
	 * Constructs a new {@code LineReader} with the specified capacity and charset.
	 *
	 * @param in the {@code InputStream} to read data from.
	 * @param capacity the capacity of the buffer.
	 * @param charset the charset used to decode data. Only US-ASCII, UTF-8 and ISO-8859-1 are
	 * supported.
	 * @throws NullPointerException if {@code in} or {@code charset} is null.
	 * @throws IllegalArgumentException if {@code capacity} is negative or zero
	 * or the specified charset is not supported.
	 */
	public StrictLineReader(InputStream in, int capacity, Charset charset) {
		if (in == null || charset == null) {
			throw new NullPointerException();
		}
		if (capacity < 0) {
			throw new IllegalArgumentException("capacity <= 0");
		}
		if (!(charset.equals(Util.US_ASCII))) {
			throw new IllegalArgumentException("Unsupported encoding");
		}

		this.in = in;
		this.charset = charset;
		buf = new byte[capacity];
	}

	/**
	 * Closes the reader by closing the underlying {@code InputStream} and
	 * marking this reader as closed.
	 *
	 * @throws IOException for errors when closing the underlying {@code InputStream}.
	 */
	public void close() throws IOException {
		synchronized (in) {
			if (buf != null) {
				buf = null;
				in.close();
			}
		}
	}

	/**
	 * Reads the next line. A line ends with {@code "\n"} or {@code "\r\n"},
	 * this end of line marker is not included in the result.
	 *
	 * @return the next line from the input.
	 * @throws IOException for underlying {@code InputStream} errors.
	 * @throws EOFException for the end of source stream.
	 */
	public String readLine() throws IOException {
		synchronized (in) {
			if (buf == null) {
				throw new IOException("LineReader is closed");
			}

			// Read more data if we are at the end of the buffered data.
			// Though it's an error to read after an exception, we will let {@code fillBuf()}
			// throw again if that happens; thus we need to handle end == -1 as well as end == pos.
			if (pos >= end) {
				fillBuf();
			}
			// Try to find LF in the buffered data and return the line if successful.
			for (int i = pos; i != end; ++i) {
				if (buf[i] == LF) {
					int lineEnd = (i != pos && buf[i - 1] == CR) ? i - 1 : i;
					String res = new String(buf, pos, lineEnd - pos, charset.name());
					pos = i + 1;
					return res;
				}
			}

			// Let's anticipate up to 80 characters on top of those already read.
			ByteArrayOutputStream out = new ByteArrayOutputStream(end - pos + 80) {
				@Override
				public String toString() {
					int length = (count > 0 && buf[count - 1] == CR) ? count - 1 : count;
					try {
						return new String(buf, 0, length, charset.name());
					} catch (UnsupportedEncodingException e) {
						throw new AssertionError(e); // Since we control the charset this will never happen.
					}
				}
			};

			while (true) {
				out.write(buf, pos, end - pos);
				// Mark unterminated line in case fillBuf throws EOFException or IOException.
				end = -1;
				fillBuf();
				// Try to find LF in the buffered data and return the line if successful.
				for (int i = pos; i != end; ++i) {
					if (buf[i] == LF) {
						if (i != pos) {
							out.write(buf, pos, i - pos);
						}
						pos = i + 1;
						return out.toString();
					}
				}
			}
		}
	}

	/**
	 * Reads new input data into the buffer. Call only with pos == end or end == -1,
	 * depending on the desired outcome if the function throws.
	 */
	private void fillBuf() throws IOException {
		int result = in.read(buf, 0, buf.length);
		if (result == -1) {
			throw new EOFException();
		}
		pos = 0;
		end = result;
	}
}



================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/ext/Util.java
================================================
/*
 * Copyright (C) 2010 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.nostra13.universalimageloader.cache.disc.impl.ext;

import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.io.Reader;
import java.io.StringWriter;
import java.nio.charset.Charset;

/** Junk drawer of utility methods. */
final class Util {
	static final Charset US_ASCII = Charset.forName("US-ASCII");
	static final Charset UTF_8 = Charset.forName("UTF-8");

	private Util() {
	}

	static String readFully(Reader reader) throws IOException {
		try {
			StringWriter writer = new StringWriter();
			char[] buffer = new char[1024];
			int count;
			while ((count = reader.read(buffer)) != -1) {
				writer.write(buffer, 0, count);
			}
			return writer.toString();
		} finally {
			reader.close();
		}
	}

	/**
	 * Deletes the contents of {@code dir}. Throws an IOException if any file
	 * could not be deleted, or if {@code dir} is not a readable directory.
	 */
	static void deleteContents(File dir) throws IOException {
		File[] files = dir.listFiles();
		if (files == null) {
			throw new IOException("not a readable directory: " + dir);
		}
		for (File file : files) {
			if (file.isDirectory()) {
				deleteContents(file);
			}
			if (!file.delete()) {
				throw new IOException("failed to delete file: " + file);
			}
		}
	}

	static void closeQuietly(/*Auto*/Closeable closeable) {
		if (closeable != null) {
			try {
				closeable.close();
			} catch (RuntimeException rethrown) {
				throw rethrown;
			} catch (Exception ignored) {
			}
		}
	}
}

================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/naming/FileNameGenerator.java
================================================
/*******************************************************************************
 * Copyright 2011-2013 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.disc.naming;

/**
 * Generates names for files at disk cache
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.3.1
 */
public interface FileNameGenerator {

	/** Generates unique file name for image defined by URI */
	String generate(String imageUri);
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/naming/HashCodeFileNameGenerator.java
================================================
/*******************************************************************************
 * Copyright 2011-2013 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.disc.naming;

/**
 * Names image file as image URI {@linkplain String#hashCode() hashcode}
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.3.1
 */
public class HashCodeFileNameGenerator implements FileNameGenerator {
	@Override
	public String generate(String imageUri) {
		return String.valueOf(imageUri.hashCode());
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/naming/Md5FileNameGenerator.java
================================================
/*******************************************************************************
 * Copyright 2011-2013 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.disc.naming;

import com.nostra13.universalimageloader.utils.L;

import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

/**
 * Names image file as MD5 hash of image URI
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.4.0
 */
public class Md5FileNameGenerator implements FileNameGenerator {

	private static final String HASH_ALGORITHM = "MD5";
	private static final int RADIX = 10 + 26; // 10 digits + 26 letters

	@Override
	public String generate(String imageUri) {
		byte[] md5 = getMD5(imageUri.getBytes());
		BigInteger bi = new BigInteger(md5).abs();
		return bi.toString(RADIX);
	}

	private byte[] getMD5(byte[] data) {
		byte[] hash = null;
		try {
			MessageDigest digest = MessageDigest.getInstance(HASH_ALGORITHM);
			digest.update(data);
			hash = digest.digest();
		} catch (NoSuchAlgorithmException e) {
			L.e(e);
		}
		return hash;
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/BaseMemoryCache.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.memory;

import android.graphics.Bitmap;

import java.lang.ref.Reference;
import java.util.*;

/**
 * Base memory cache. Implements common functionality for memory cache. Provides object references (
 * {@linkplain Reference not strong}) storing.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.0.0
 */
public abstract class BaseMemoryCache implements MemoryCache {

	/** Stores not strong references to objects */
	private final Map<String, Reference<Bitmap>> softMap = Collections.synchronizedMap(new HashMap<String, Reference<Bitmap>>());

	@Override
	public Bitmap get(String key) {
		Bitmap result = null;
		Reference<Bitmap> reference = softMap.get(key);
		if (reference != null) {
			result = reference.get();
		}
		return result;
	}

	@Override
	public boolean put(String key, Bitmap value) {
		softMap.put(key, createReference(value));
		return true;
	}

	@Override
	public Bitmap remove(String key) {
		Reference<Bitmap> bmpRef = softMap.remove(key);
		return bmpRef == null ? null : bmpRef.get();
	}

	@Override
	public Collection<String> keys() {
		synchronized (softMap) {
			return new HashSet<String>(softMap.keySet());
		}
	}

	@Override
	public void clear() {
		softMap.clear();
	}

	/** Creates {@linkplain Reference not strong} reference of value */
	protected abstract Reference<Bitmap> createReference(Bitmap value);
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/LimitedMemoryCache.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.memory;

import android.graphics.Bitmap;

import com.nostra13.universalimageloader.utils.L;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * Limited cache. Provides object storing. Size of all stored bitmaps will not to exceed size limit (
 * {@link #getSizeLimit()}).<br />
 * <br />
 * <b>NOTE:</b> This cache uses strong and weak references for stored Bitmaps. Strong references - for limited count of
 * Bitmaps (depends on cache size), weak references - for all other cached Bitmaps.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @see BaseMemoryCache
 * @since 1.0.0
 */
public abstract class LimitedMemoryCache extends BaseMemoryCache {

	private static final int MAX_NORMAL_CACHE_SIZE_IN_MB = 16;
	private static final int MAX_NORMAL_CACHE_SIZE = MAX_NORMAL_CACHE_SIZE_IN_MB * 1024 * 1024;

	private final int sizeLimit;

	private final AtomicInteger cacheSize;

	/**
	 * Contains strong references to stored objects. Each next object is added last. If hard cache size will exceed
	 * limit then first object is deleted (but it continue exist at {@link #softMap} and can be collected by GC at any
	 * time)
	 */
	private final List<Bitmap> hardCache = Collections.synchronizedList(new LinkedList<Bitmap>());

	/** @param sizeLimit Maximum size for cache (in bytes) */
	public LimitedMemoryCache(int sizeLimit) {
		this.sizeLimit = sizeLimit;
		cacheSize = new AtomicInteger();
		if (sizeLimit > MAX_NORMAL_CACHE_SIZE) {
			L.w("You set too large memory cache size (more than %1$d Mb)", MAX_NORMAL_CACHE_SIZE_IN_MB);
		}
	}

	@Override
	public boolean put(String key, Bitmap value) {
		boolean putSuccessfully = false;
		// Try to add value to hard cache
		int valueSize = getSize(value);
		int sizeLimit = getSizeLimit();
		int curCacheSize = cacheSize.get();
		if (valueSize < sizeLimit) {
			while (curCacheSize + valueSize > sizeLimit) {
				Bitmap removedValue = removeNext();
				if (hardCache.remove(removedValue)) {
					curCacheSize = cacheSize.addAndGet(-getSize(removedValue));
				}
			}
			hardCache.add(value);
			cacheSize.addAndGet(valueSize);

			putSuccessfully = true;
		}
		// Add value to soft cache
		super.put(key, value);
		return putSuccessfully;
	}

	@Override
	public Bitmap remove(String key) {
		Bitmap value = super.get(key);
		if (value != null) {
			if (hardCache.remove(value)) {
				cacheSize.addAndGet(-getSize(value));
			}
		}
		return super.remove(key);
	}

	@Override
	public void clear() {
		hardCache.clear();
		cacheSize.set(0);
		super.clear();
	}

	protected int getSizeLimit() {
		return sizeLimit;
	}

	protected abstract int getSize(Bitmap value);

	protected abstract Bitmap removeNext();
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/MemoryCache.java
================================================
/*******************************************************************************
 * Copyright 2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.memory;

import android.graphics.Bitmap;

import java.util.Collection;

/**
 * Interface for memory cache
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.9.2
 */
public interface MemoryCache {
	/**
	 * Puts value into cache by key
	 *
	 * @return <b>true</b> - if value was put into cache successfully, <b>false</b> - if value was <b>not</b> put into
	 * cache
	 */
	boolean put(String key, Bitmap value);

	/** Returns value by key. If there is no value for key then null will be returned. */
	Bitmap get(String key);

	/** Removes item by key */
	Bitmap remove(String key);

	/** Returns all keys of cache */
	Collection<String> keys();

	/** Remove all items from cache */
	void clear();
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/FIFOLimitedMemoryCache.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.memory.impl;

import android.graphics.Bitmap;
import com.nostra13.universalimageloader.cache.memory.LimitedMemoryCache;

import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

/**
 * Limited {@link Bitmap bitmap} cache. Provides {@link Bitmap bitmaps} storing. Size of all stored bitmaps will not to
 * exceed size limit. When cache reaches limit size then cache clearing is processed by FIFO principle.<br />
 * <br />
 * <b>NOTE:</b> This cache uses strong and weak references for stored Bitmaps. Strong references - for limited count of
 * Bitmaps (depends on cache size), weak references - for all other cached Bitmaps.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.0.0
 */
public class FIFOLimitedMemoryCache extends LimitedMemoryCache {

	private final List<Bitmap> queue = Collections.synchronizedList(new LinkedList<Bitmap>());

	public FIFOLimitedMemoryCache(int sizeLimit) {
		super(sizeLimit);
	}

	@Override
	public boolean put(String key, Bitmap value) {
		if (super.put(key, value)) {
			queue.add(value);
			return true;
		} else {
			return false;
		}
	}

	@Override
	public Bitmap remove(String key) {
		Bitmap value = super.get(key);
		if (value != null) {
			queue.remove(value);
		}
		return super.remove(key);
	}

	@Override
	public void clear() {
		queue.clear();
		super.clear();
	}

	@Override
	protected int getSize(Bitmap value) {
		return value.getRowBytes() * value.getHeight();
	}

	@Override
	protected Bitmap removeNext() {
		return queue.remove(0);
	}

	@Override
	protected Reference<Bitmap> createReference(Bitmap value) {
		return new WeakReference<Bitmap>(value);
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/FuzzyKeyMemoryCache.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.memory.impl;

import android.graphics.Bitmap;

import com.nostra13.universalimageloader.cache.memory.MemoryCache;

import java.util.Collection;
import java.util.Comparator;

/**
 * Decorator for {@link MemoryCache}. Provides special feature for cache: some different keys are considered as
 * equals (using {@link Comparator comparator}). And when you try to put some value into cache by key so entries with
 * "equals" keys will be removed from cache before.<br />
 * <b>NOTE:</b> Used for internal needs. Normally you don't need to use this class.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.0.0
 */
public class FuzzyKeyMemoryCache implements MemoryCache {

	private final MemoryCache cache;
	private final Comparator<String> keyComparator;

	public FuzzyKeyMemoryCache(MemoryCache cache, Comparator<String> keyComparator) {
		this.cache = cache;
		this.keyComparator = keyComparator;
	}

	@Override
	public boolean put(String key, Bitmap value) {
		// Search equal key and remove this entry
		synchronized (cache) {
			String keyToRemove = null;
			for (String cacheKey : cache.keys()) {
				if (keyComparator.compare(key, cacheKey) == 0) {
					keyToRemove = cacheKey;
					break;
				}
			}
			if (keyToRemove != null) {
				cache.remove(keyToRemove);
			}
		}
		return cache.put(key, value);
	}

	@Override
	public Bitmap get(String key) {
		return cache.get(key);
	}

	@Override
	public Bitmap remove(String key) {
		return cache.remove(key);
	}

	@Override
	public void clear() {
		cache.clear();
	}

	@Override
	public Collection<String> keys() {
		return cache.keys();
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/LRULimitedMemoryCache.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.memory.impl;

import android.graphics.Bitmap;
import com.nostra13.universalimageloader.cache.memory.LimitedMemoryCache;

import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;

/**
 * Limited {@link Bitmap bitmap} cache. Provides {@link Bitmap bitmaps} storing. Size of all stored bitmaps will not to
 * exceed size limit. When cache reaches limit size then the least recently used bitmap is deleted from cache.<br />
 * <br />
 * <b>NOTE:</b> This cache uses strong and weak references for stored Bitmaps. Strong references - for limited count of
 * Bitmaps (depends on cache size), weak references - for all other cached Bitmaps.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.3.0
 */
public class LRULimitedMemoryCache extends LimitedMemoryCache {

	private static final int INITIAL_CAPACITY = 10;
	private static final float LOAD_FACTOR = 1.1f;

	/** Cache providing Least-Recently-Used logic */
	private final Map<String, Bitmap> lruCache = Collections.synchronizedMap(new LinkedHashMap<String, Bitmap>(INITIAL_CAPACITY, LOAD_FACTOR, true));

	/** @param maxSize Maximum sum of the sizes of the Bitmaps in this cache */
	public LRULimitedMemoryCache(int maxSize) {
		super(maxSize);
	}

	@Override
	public boolean put(String key, Bitmap value) {
		if (super.put(key, value)) {
			lruCache.put(key, value);
			return true;
		} else {
			return false;
		}
	}

	@Override
	public Bitmap get(String key) {
		lruCache.get(key); // call "get" for LRU logic
		return super.get(key);
	}

	@Override
	public Bitmap remove(String key) {
		lruCache.remove(key);
		return super.remove(key);
	}

	@Override
	public void clear() {
		lruCache.clear();
		super.clear();
	}

	@Override
	protected int getSize(Bitmap value) {
		return value.getRowBytes() * value.getHeight();
	}

	@Override
	protected Bitmap removeNext() {
		Bitmap mostLongUsedValue = null;
		synchronized (lruCache) {
			Iterator<Entry<String, Bitmap>> it = lruCache.entrySet().iterator();
			if (it.hasNext()) {
				Entry<String, Bitmap> entry = it.next();
				mostLongUsedValue = entry.getValue();
				it.remove();
			}
		}
		return mostLongUsedValue;
	}

	@Override
	protected Reference<Bitmap> createReference(Bitmap value) {
		return new WeakReference<Bitmap>(value);
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/LargestLimitedMemoryCache.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.memory.impl;

import android.graphics.Bitmap;
import com.nostra13.universalimageloader.cache.memory.LimitedMemoryCache;

import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

/**
 * Limited {@link Bitmap bitmap} cache. Provides {@link Bitmap bitmaps} storing. Size of all stored bitmaps will not to
 * exceed size limit. When cache reaches limit size then the bitmap which has the largest size is deleted from
 * cache.<br />
 * <br />
 * <b>NOTE:</b> This cache uses strong and weak references for stored Bitmaps. Strong references - for limited count of
 * Bitmaps (depends on cache size), weak references - for all other cached Bitmaps.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.0.0
 */
public class LargestLimitedMemoryCache extends LimitedMemoryCache {
	/**
	 * Contains strong references to stored objects (keys) and sizes of the objects. If hard cache
	 * size will exceed limit then object with the largest size is deleted (but it continue exist at
	 * {@link #softMap} and can be collected by GC at any time)
	 */
	private final Map<Bitmap, Integer> valueSizes = Collections.synchronizedMap(new HashMap<Bitmap, Integer>());

	public LargestLimitedMemoryCache(int sizeLimit) {
		super(sizeLimit);
	}

	@Override
	public boolean put(String key, Bitmap value) {
		if (super.put(key, value)) {
			valueSizes.put(value, getSize(value));
			return true;
		} else {
			return false;
		}
	}

	@Override
	public Bitmap remove(String key) {
		Bitmap value = super.get(key);
		if (value != null) {
			valueSizes.remove(value);
		}
		return super.remove(key);
	}

	@Override
	public void clear() {
		valueSizes.clear();
		super.clear();
	}

	@Override
	protected int getSize(Bitmap value) {
		return value.getRowBytes() * value.getHeight();
	}

	@Override
	protected Bitmap removeNext() {
		Integer maxSize = null;
		Bitmap largestValue = null;
		Set<Entry<Bitmap, Integer>> entries = valueSizes.entrySet();
		synchronized (valueSizes) {
			for (Entry<Bitmap, Integer> entry : entries) {
				if (largestValue == null) {
					largestValue = entry.getKey();
					maxSize = entry.getValue();
				} else {
					Integer size = entry.getValue();
					if (size > maxSize) {
						maxSize = size;
						largestValue = entry.getKey();
					}
				}
			}
		}
		valueSizes.remove(largestValue);
		return largestValue;
	}

	@Override
	protected Reference<Bitmap> createReference(Bitmap value) {
		return new WeakReference<Bitmap>(value);
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/LimitedAgeMemoryCache.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.memory.impl;

import android.graphics.Bitmap;

import com.nostra13.universalimageloader.cache.memory.MemoryCache;

import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * Decorator for {@link MemoryCache}. Provides special feature for cache: if some cached object age exceeds defined
 * value then this object will be removed from cache.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @see MemoryCache
 * @since 1.3.1
 */
public class LimitedAgeMemoryCache implements MemoryCache {

	private final MemoryCache cache;

	private final long maxAge;
	private final Map<String, Long> loadingDates = Collections.synchronizedMap(new HashMap<String, Long>());

	/**
	 * @param cache  Wrapped memory cache
	 * @param maxAge Max object age <b>(in seconds)</b>. If object age will exceed this value then it'll be removed from
	 *               cache on next treatment (and therefore be reloaded).
	 */
	public LimitedAgeMemoryCache(MemoryCache cache, long maxAge) {
		this.cache = cache;
		this.maxAge = maxAge * 1000; // to milliseconds
	}

	@Override
	public boolean put(String key, Bitmap value) {
		boolean putSuccesfully = cache.put(key, value);
		if (putSuccesfully) {
			loadingDates.put(key, System.currentTimeMillis());
		}
		return putSuccesfully;
	}

	@Override
	public Bitmap get(String key) {
		Long loadingDate = loadingDates.get(key);
		if (loadingDate != null && System.currentTimeMillis() - loadingDate > maxAge) {
			cache.remove(key);
			loadingDates.remove(key);
		}

		return cache.get(key);
	}

	@Override
	public Bitmap remove(String key) {
		loadingDates.remove(key);
		return cache.remove(key);
	}

	@Override
	public Collection<String> keys() {
		return cache.keys();
	}

	@Override
	public void clear() {
		cache.clear();
		loadingDates.clear();
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/LruMemoryCache.java
================================================
package com.nostra13.universalimageloader.cache.memory.impl;

import android.graphics.Bitmap;

import com.nostra13.universalimageloader.cache.memory.MemoryCache;

import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * A cache that holds strong references to a limited number of Bitmaps. Each time a Bitmap is accessed, it is moved to
 * the head of a queue. When a Bitmap is added to a full cache, the Bitmap at the end of that queue is evicted and may
 * become eligible for garbage collection.<br />
 * <br />
 * <b>NOTE:</b> This cache uses only strong references for stored Bitmaps.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.8.1
 */
public class LruMemoryCache implements MemoryCache {

	private final LinkedHashMap<String, Bitmap> map;

	private final int maxSize;
	/** Size of this cache in bytes */
	private int size;

	/** @param maxSize Maximum sum of the sizes of the Bitmaps in this cache */
	public LruMemoryCache(int maxSize) {
		if (maxSize <= 0) {
			throw new IllegalArgumentException("maxSize <= 0");
		}
		this.maxSize = maxSize;
		this.map = new LinkedHashMap<String, Bitmap>(0, 0.75f, true);
	}

	/**
	 * Returns the Bitmap for {@code key} if it exists in the cache. If a Bitmap was returned, it is moved to the head
	 * of the queue. This returns null if a Bitmap is not cached.
	 */
	@Override
	public final Bitmap get(String key) {
		if (key == null) {
			throw new NullPointerException("key == null");
		}

		synchronized (this) {
			return map.get(key);
		}
	}

	/** Caches {@code Bitmap} for {@code key}. The Bitmap is moved to the head of the queue. */
	@Override
	public final boolean put(String key, Bitmap value) {
		if (key == null || value == null) {
			throw new NullPointerException("key == null || value == null");
		}

		synchronized (this) {
			size += sizeOf(key, value);
			Bitmap previous = map.put(key, value);
			if (previous != null) {
				size -= sizeOf(key, previous);
			}
		}

		trimToSize(maxSize);
		return true;
	}

	/**
	 * Remove the eldest entries until the total of remaining entries is at or below the requested size.
	 *
	 * @param maxSize the maximum size of the cache before returning. May be -1 to evict even 0-sized elements.
	 */
	private void trimToSize(int maxSize) {
		while (true) {
			String key;
			Bitmap value;
			synchronized (this) {
				if (size < 0 || (map.isEmpty() && size != 0)) {
					throw new IllegalStateException(getClass().getName() + ".sizeOf() is reporting inconsistent results!");
				}

				if (size <= maxSize || map.isEmpty()) {
					break;
				}

				Map.Entry<String, Bitmap> toEvict = map.entrySet().iterator().next();
				if (toEvict == null) {
					break;
				}
				key = toEvict.getKey();
				value = toEvict.getValue();
				map.remove(key);
				size -= sizeOf(key, value);
			}
		}
	}

	/** Removes the entry for {@code key} if it exists. */
	@Override
	public final Bitmap remove(String key) {
		if (key == null) {
			throw new NullPointerException("key == null");
		}

		synchronized (this) {
			Bitmap previous = map.remove(key);
			if (previous != null) {
				size -= sizeOf(key, previous);
			}
			return previous;
		}
	}

	@Override
	public Collection<String> keys() {
		synchronized (this) {
			return new HashSet<String>(map.keySet());
		}
	}

	@Override
	public void clear() {
		trimToSize(-1); // -1 will evict 0-sized elements
	}

	/**
	 * Returns the size {@code Bitmap} in bytes.
	 * <p/>
	 * An entry's size must not change while it is in the cache.
	 */
	private int sizeOf(String key, Bitmap value) {
		return value.getRowBytes() * value.getHeight();
	}

	@Override
	public synchronized final String toString() {
		return String.format("LruCache[maxSize=%d]", maxSize);
	}
}

================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/UsingFreqLimitedMemoryCache.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.memory.impl;

import android.graphics.Bitmap;
import com.nostra13.universalimageloader.cache.memory.LimitedMemoryCache;

import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

/**
 * Limited {@link Bitmap bitmap} cache. Provides {@link Bitmap bitmaps} storing. Size of all stored bitmaps will not to
 * exceed size limit. When cache reaches limit size then the bitmap which used the least frequently is deleted from
 * cache.<br />
 * <br />
 * <b>NOTE:</b> This cache uses strong and weak references for stored Bitmaps. Strong references - for limited count of
 * Bitmaps (depends on cache size), weak references - for all other cached Bitmaps.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.0.0
 */
public class UsingFreqLimitedMemoryCache extends LimitedMemoryCache {
	/**
	 * Contains strong references to stored objects (keys) and last object usage date (in milliseconds). If hard cache
	 * size will exceed limit then object with the least frequently usage is deleted (but it continue exist at
	 * {@link #softMap} and can be collected by GC at any time)
	 */
	private final Map<Bitmap, Integer> usingCounts = Collections.synchronizedMap(new HashMap<Bitmap, Integer>());

	public UsingFreqLimitedMemoryCache(int sizeLimit) {
		super(sizeLimit);
	}

	@Override
	public boolean put(String key, Bitmap value) {
		if (super.put(key, value)) {
			usingCounts.put(value, 0);
			return true;
		} else {
			return false;
		}
	}

	@Override
	public Bitmap get(String key) {
		Bitmap value = super.get(key);
		// Increment usage count for value if value is contained in hardCahe
		if (value != null) {
			Integer usageCount = usingCounts.get(value);
			if (usageCount != null) {
				usingCounts.put(value, usageCount + 1);
			}
		}
		return value;
	}

	@Override
	public Bitmap remove(String key) {
		Bitmap value = super.get(key);
		if (value != null) {
			usingCounts.remove(value);
		}
		return super.remove(key);
	}

	@Override
	public void clear() {
		usingCounts.clear();
		super.clear();
	}

	@Override
	protected int getSize(Bitmap value) {
		return value.getRowBytes() * value.getHeight();
	}

	@Override
	protected Bitmap removeNext() {
		Integer minUsageCount = null;
		Bitmap leastUsedValue = null;
		Set<Entry<Bitmap, Integer>> entries = usingCounts.entrySet();
		synchronized (usingCounts) {
			for (Entry<Bitmap, Integer> entry : entries) {
				if (leastUsedValue == null) {
					leastUsedValue = entry.getKey();
					minUsageCount = entry.getValue();
				} else {
					Integer lastValueUsage = entry.getValue();
					if (lastValueUsage < minUsageCount) {
						minUsageCount = lastValueUsage;
						leastUsedValue = entry.getKey();
					}
				}
			}
		}
		usingCounts.remove(leastUsedValue);
		return leastUsedValue;
	}

	@Override
	protected Reference<Bitmap> createReference(Bitmap value) {
		return new WeakReference<Bitmap>(value);
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/WeakMemoryCache.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.cache.memory.impl;

import android.graphics.Bitmap;
import com.nostra13.universalimageloader.cache.memory.BaseMemoryCache;

import java.lang.ref.Reference;
import java.lang.ref.WeakReference;

/**
 * Memory cache with {@linkplain WeakReference weak references} to {@linkplain android.graphics.Bitmap bitmaps}<br />
 * <br />
 * <b>NOTE:</b> This cache uses only weak references for stored Bitmaps.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.5.3
 */
public class WeakMemoryCache extends BaseMemoryCache {
	@Override
	protected Reference<Bitmap> createReference(Bitmap value) {
		return new WeakReference<Bitmap>(value);
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/core/DefaultConfigurationFactory.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.core;

import android.annotation.TargetApi;
import android.app.ActivityManager;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.os.Build;
import com.nostra13.universalimageloader.cache.disc.DiskCache;
import com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiskCache;
import com.nostra13.universalimageloader.cache.disc.impl.ext.LruDiskCache;
import com.nostra13.universalimageloader.cache.disc.naming.FileNameGenerator;
import com.nostra13.universalimageloader.cache.disc.naming.HashCodeFileNameGenerator;
import com.nostra13.universalimageloader.cache.memory.MemoryCache;
import com.nostra13.universalimageloader.cache.memory.impl.LruMemoryCache;
import com.nostra13.universalimageloader.core.assist.QueueProcessingType;
import com.nostra13.universalimageloader.core.assist.deque.LIFOLinkedBlockingDeque;
import com.nostra13.universalimageloader.core.decode.BaseImageDecoder;
import com.nostra13.universalimageloader.core.decode.ImageDecoder;
import com.nostra13.universalimageloader.core.display.BitmapDisplayer;
import com.nostra13.universalimageloader.core.display.SimpleBitmapDisplayer;
import com.nostra13.universalimageloader.core.download.BaseImageDownloader;
import com.nostra13.universalimageloader.core.download.ImageDownloader;
import com.nostra13.universalimageloader.utils.L;
import com.nostra13.universalimageloader.utils.StorageUtils;

import java.io.File;
import java.io.IOException;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * Factory for providing of default options for {@linkplain ImageLoaderConfiguration configuration}
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.5.6
 */
public class DefaultConfigurationFactory {

	/** Creates default implementation of task executor */
	public static Executor createExecutor(int threadPoolSize, int threadPriority,
			QueueProcessingType tasksProcessingType) {
		boolean lifo = tasksProcessingType == QueueProcessingType.LIFO;
		BlockingQueue<Runnable> taskQueue =
				lifo ? new LIFOLinkedBlockingDeque<Runnable>() : new LinkedBlockingQueue<Runnable>();
		return new ThreadPoolExecutor(threadPoolSize, threadPoolSize, 0L, TimeUnit.MILLISECONDS, taskQueue,
				createThreadFactory(threadPriority, "uil-pool-"));
	}

	/** Creates default implementation of task distributor */
	public static Executor createTaskDistributor() {
		return Executors.newCachedThreadPool(createThreadFactory(Thread.NORM_PRIORITY, "uil-pool-d-"));
	}

	/** Creates {@linkplain HashCodeFileNameGenerator default implementation} of FileNameGenerator */
	public static FileNameGenerator createFileNameGenerator() {
		return new HashCodeFileNameGenerator();
	}

	/**
	 * Creates default implementation of {@link DiskCache} depends on incoming parameters
	 */
	public static DiskCache createDiskCache(Context context, FileNameGenerator diskCacheFileNameGenerator,
			long diskCacheSize, int diskCacheFileCount) {
		File reserveCacheDir = createReserveDiskCacheDir(context);
		if (diskCacheSize > 0 || diskCacheFileCount > 0) {
			File individualCacheDir = StorageUtils.getIndividualCacheDirectory(context);
			try {
				return new LruDiskCache(individualCacheDir, reserveCacheDir, diskCacheFileNameGenerator, diskCacheSize,
						diskCacheFileCount);
			} catch (IOException e) {
				L.e(e);
				// continue and create unlimited cache
			}
		}
		File cacheDir = StorageUtils.getCacheDirectory(context);
		return new UnlimitedDiskCache(cacheDir, reserveCacheDir, diskCacheFileNameGenerator);
	}

	/** Creates reserve disk cache folder which will be used if primary disk cache folder becomes unavailable */
	private static File createReserveDiskCacheDir(Context context) {
		File cacheDir = StorageUtils.getCacheDirectory(context, false);
		File individualDir = new File(cacheDir, "uil-images");
		if (individualDir.exists() || individualDir.mkdir()) {
			cacheDir = individualDir;
		}
		return cacheDir;
	}

	/**
	 * Creates default implementation of {@link MemoryCache} - {@link LruMemoryCache}<br />
	 * Default cache size = 1/8 of available app memory.
	 */
	public static MemoryCache createMemoryCache(Context context, int memoryCacheSize) {
		if (memoryCacheSize == 0) {
			ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
			int memoryClass = am.getMemoryClass();
			if (hasHoneycomb() && isLargeHeap(context)) {
				memoryClass = getLargeMemoryClass(am);
			}
			memoryCacheSize = 1024 * 1024 * memoryClass / 8;
		}
		return new LruMemoryCache(memoryCacheSize);
	}

	private static boolean hasHoneycomb() {
		return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
	}

	@TargetApi(Build.VERSION_CODES.HONEYCOMB)
	private static boolean isLargeHeap(Context context) {
		return (context.getApplicationInfo().flags & ApplicationInfo.FLAG_LARGE_HEAP) != 0;
	}

	@TargetApi(Build.VERSION_CODES.HONEYCOMB)
	private static int getLargeMemoryClass(ActivityManager am) {
		return am.getLargeMemoryClass();
	}

	/** Creates default implementation of {@link ImageDownloader} - {@link BaseImageDownloader} */
	public static ImageDownloader createImageDownloader(Context context) {
		return new BaseImageDownloader(context);
	}

	/** Creates default implementation of {@link ImageDecoder} - {@link BaseImageDecoder} */
	public static ImageDecoder createImageDecoder(boolean loggingEnabled) {
		return new BaseImageDecoder(loggingEnabled);
	}

	/** Creates default implementation of {@link BitmapDisplayer} - {@link SimpleBitmapDisplayer} */
	public static BitmapDisplayer createBitmapDisplayer() {
		return new SimpleBitmapDisplayer();
	}

	/** Creates default implementation of {@linkplain ThreadFactory thread factory} for task executor */
	private static ThreadFactory createThreadFactory(int threadPriority, String threadNamePrefix) {
		return new DefaultThreadFactory(threadPriority, threadNamePrefix);
	}

	private static class DefaultThreadFactory implements ThreadFactory {

		private static final AtomicInteger poolNumber = new AtomicInteger(1);

		private final ThreadGroup group;
		private final AtomicInteger threadNumber = new AtomicInteger(1);
		private final String namePrefix;
		private final int threadPriority;

		DefaultThreadFactory(int threadPriority, String threadNamePrefix) {
			this.threadPriority = threadPriority;
			group = Thread.currentThread().getThreadGroup();
			namePrefix = threadNamePrefix + poolNumber.getAndIncrement() + "-thread-";
		}

		@Override
		public Thread newThread(Runnable r) {
			Thread t = new Thread(group, r, namePrefix + threadNumber.getAndIncrement(), 0);
			if (t.isDaemon()) t.setDaemon(false);
			t.setPriority(threadPriority);
			return t;
		}
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/core/DisplayBitmapTask.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.core;

import android.graphics.Bitmap;
import com.nostra13.universalimageloader.core.assist.LoadedFrom;
import com.nostra13.universalimageloader.core.display.BitmapDisplayer;
import com.nostra13.universalimageloader.core.imageaware.ImageAware;
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
import com.nostra13.universalimageloader.utils.L;

/**
 * Displays bitmap in {@link com.nostra13.universalimageloader.core.imageaware.ImageAware}. Must be called on UI thread.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @see ImageLoadingListener
 * @see BitmapDisplayer
 * @since 1.3.1
 */
final class DisplayBitmapTask implements Runnable {

	private static final String LOG_DISPLAY_IMAGE_IN_IMAGEAWARE = "Display image in ImageAware (loaded from %1$s) [%2$s]";
	private static final String LOG_TASK_CANCELLED_IMAGEAWARE_REUSED = "ImageAware is reused for another image. Task is cancelled. [%s]";
	private static final String LOG_TASK_CANCELLED_IMAGEAWARE_COLLECTED = "ImageAware was collected by GC. Task is cancelled. [%s]";

	private final Bitmap bitmap;
	private final String imageUri;
	private final ImageAware imageAware;
	private final String memoryCacheKey;
	private final BitmapDisplayer displayer;
	private final ImageLoadingListener listener;
	private final ImageLoaderEngine engine;
	private final LoadedFrom loadedFrom;

	public DisplayBitmapTask(Bitmap bitmap, ImageLoadingInfo imageLoadingInfo, ImageLoaderEngine engine,
			LoadedFrom loadedFrom) {
		this.bitmap = bitmap;
		imageUri = imageLoadingInfo.uri;
		imageAware = imageLoadingInfo.imageAware;
		memoryCacheKey = imageLoadingInfo.memoryCacheKey;
		displayer = imageLoadingInfo.options.getDisplayer();
		listener = imageLoadingInfo.listener;
		this.engine = engine;
		this.loadedFrom = loadedFrom;
	}

	@Override
	public void run() {
		if (imageAware.isCollected()) {
			L.d(LOG_TASK_CANCELLED_IMAGEAWARE_COLLECTED, memoryCacheKey);
			listener.onLoadingCancelled(imageUri, imageAware.getWrappedView());
		} else if (isViewWasReused()) {
			L.d(LOG_TASK_CANCELLED_IMAGEAWARE_REUSED, memoryCacheKey);
			listener.onLoadingCancelled(imageUri, imageAware.getWrappedView());
		} else {
			L.d(LOG_DISPLAY_IMAGE_IN_IMAGEAWARE, loadedFrom, memoryCacheKey);
			displayer.display(bitmap, imageAware, loadedFrom);
			engine.cancelDisplayTaskFor(imageAware);
			listener.onLoadingComplete(imageUri, imageAware.getWrappedView(), bitmap);
		}
	}

	/** Checks whether memory cache key (image URI) for current ImageAware is actual */
	private boolean isViewWasReused() {
		String currentCacheKey = engine.getLoadingUriForView(imageAware);
		return !memoryCacheKey.equals(currentCacheKey);
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/core/DisplayImageOptions.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.core;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory.Options;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
import com.nostra13.universalimageloader.core.assist.ImageScaleType;
import com.nostra13.universalimageloader.core.display.BitmapDisplayer;
import com.nostra13.universalimageloader.core.display.SimpleBitmapDisplayer;
import com.nostra13.universalimageloader.core.download.ImageDownloader;
import com.nostra13.universalimageloader.core.process.BitmapProcessor;

/**
 * Contains options for image display. Defines:
 * <ul>
 * <li>whether stub image will be displayed in {@link com.nostra13.universalimageloader.core.imageaware.ImageAware
 * image aware view} during image loading</li>
 * <li>whether stub image will be displayed in {@link com.nostra13.universalimageloader.core.imageaware.ImageAware
 * image aware view} if empty URI is passed</li>
 * <li>whether stub image will be displayed in {@link com.nostra13.universalimageloader.core.imageaware.ImageAware
 * image aware view} if image loading fails</li>
 * <li>whether {@link com.nostra13.universalimageloader.core.imageaware.ImageAware image aware view} should be reset
 * before image loading start</li>
 * <li>whether loaded image will be cached in memory</li>
 * <li>whether loaded image will be cached on disk</li>
 * <li>image scale type</li>
 * <li>decoding options (including bitmap decoding configuration)</li>
 * <li>delay before loading of image</li>
 * <li>whether consider EXIF parameters of image</li>
 * <li>auxiliary object which will be passed to {@link ImageDownloader#getStream(String, Object) ImageDownloader}</li>
 * <li>pre-processor for image Bitmap (before caching in memory)</li>
 * <li>post-processor for image Bitmap (after caching in memory, before displaying)</li>
 * <li>how decoded {@link Bitmap} will be displayed</li>
 * </ul>
 * <p/>
 * You can create instance:
 * <ul>
 * <li>with {@link Builder}:<br />
 * <b>i.e.</b> :
 * <code>new {@link DisplayImageOptions}.Builder().{@link Builder#cacheInMemory() cacheInMemory()}.
 * {@link Builder#showImageOnLoading(int) showImageOnLoading()}.{@link Builder#build() build()}</code><br />
 * </li>
 * <li>or by static method: {@link #createSimple()}</li> <br />
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.0.0
 */
public final class DisplayImageOptions {

	private final int imageResOnLoading;
	private final int imageResForEmptyUri;
	private final int imageResOnFail;
	private final Drawable imageOnLoading;
	private final Drawable imageForEmptyUri;
	private final Drawable imageOnFail;
	private final boolean resetViewBeforeLoading;
	private final boolean cacheInMemory;
	private final boolean cacheOnDisk;
	private final ImageScaleType imageScaleType;
	private final Options decodingOptions;
	private final int delayBeforeLoading;
	private final boolean considerExifParams;
	private final Object extraForDownloader;
	private final BitmapProcessor preProcessor;
	private final BitmapProcessor postProcessor;
	private final BitmapDisplayer displayer;
	private final Handler handler;
	private final boolean isSyncLoading;

	private DisplayImageOptions(Builder builder) {
		imageResOnLoading = builder.imageResOnLoading;
		imageResForEmptyUri = builder.imageResForEmptyUri;
		imageResOnFail = builder.imageResOnFail;
		imageOnLoading = builder.imageOnLoading;
		imageForEmptyUri = builder.imageForEmptyUri;
		imageOnFail = builder.imageOnFail;
		resetViewBeforeLoading = builder.resetViewBeforeLoading;
		cacheInMemory = builder.cacheInMemory;
		cacheOnDisk = builder.cacheOnDisk;
		imageScaleType = builder.imageScaleType;
		decodingOptions = builder.decodingOptions;
		delayBeforeLoading = builder.delayBeforeLoading;
		considerExifParams = builder.considerExifParams;
		extraForDownloader = builder.extraForDownloader;
		preProcessor = builder.preProcessor;
		postProcessor = builder.postProcessor;
		displayer = builder.displayer;
		handler = builder.handler;
		isSyncLoading = builder.isSyncLoading;
	}

	public boolean shouldShowImageOnLoading() {
		return imageOnLoading != null || imageResOnLoading != 0;
	}

	public boolean shouldShowImageForEmptyUri() {
		return imageForEmptyUri != null || imageResForEmptyUri != 0;
	}

	public boolean shouldShowImageOnFail() {
		return imageOnFail != null || imageResOnFail != 0;
	}

	public boolean shouldPreProcess() {
		return preProcessor != null;
	}

	public boolean shouldPostProcess() {
		return postProcessor != null;
	}

	public boolean shouldDelayBeforeLoading() {
		return delayBeforeLoading > 0;
	}

	public Drawable getImageOnLoading(Resources res) {
		return imageResOnLoading != 0 ? res.getDrawable(imageResOnLoading) : imageOnLoading;
	}

	public Drawable getImageForEmptyUri(Resources res) {
		return imageResForEmptyUri != 0 ? res.getDrawable(imageResForEmptyUri) : imageForEmptyUri;
	}

	public Drawable getImageOnFail(Resources res) {
		return imageResOnFail != 0 ? res.getDrawable(imageResOnFail) : imageOnFail;
	}

	public boolean isResetViewBeforeLoading() {
		return resetViewBeforeLoading;
	}

	public boolean isCacheInMemory() {
		return cacheInMemory;
	}

	public boolean isCacheOnDisk() {
		return cacheOnDisk;
	}

	public ImageScaleType getImageScaleType() {
		return imageScaleType;
	}

	public Options getDecodingOptions() {
		return decodingOptions;
	}

	public int getDelayBeforeLoading() {
		return delayBeforeLoading;
	}

	public boolean isConsiderExifParams() {
		return considerExifParams;
	}

	public Object getExtraForDownloader() {
		return extraForDownloader;
	}

	public BitmapProcessor getPreProcessor() {
		return preProcessor;
	}

	public BitmapProcessor getPostProcessor() {
		return postProcessor;
	}

	public BitmapDisplayer getDisplayer() {
		return displayer;
	}

	public Handler getHandler() {
		return handler;
	}

	boolean isSyncLoading() {
		return isSyncLoading;
	}

	/**
	 * Builder for {@link DisplayImageOptions}
	 *
	 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
	 */
	public static class Builder {
		private int imageResOnLoading = 0;
		private int imageResForEmptyUri = 0;
		private int imageResOnFail = 0;
		private Drawable imageOnLoading = null;
		private Drawable imageForEmptyUri = null;
		private Drawable imageOnFail = null;
		private boolean resetViewBeforeLoading = false;
		private boolean cacheInMemory = false;
		private boolean cacheOnDisk = false;
		private ImageScaleType imageScaleType = ImageScaleType.IN_SAMPLE_POWER_OF_2;
		private Options decodingOptions = new Options();
		private int delayBeforeLoading = 0;
		private boolean considerExifParams = false;
		private Object extraForDownloader = null;
		private BitmapProcessor preProcessor = null;
		private BitmapProcessor postProcessor = null;
		private BitmapDisplayer displayer = DefaultConfigurationFactory.createBitmapDisplayer();
		private Handler handler = null;
		private boolean isSyncLoading = false;

		/**
		 * Stub image will be displayed in {@link com.nostra13.universalimageloader.core.imageaware.ImageAware
		 * image aware view} during image loading
		 *
		 * @param imageRes Stub image resource
		 * @deprecated Use {@link #showImageOnLoading(int)} instead
		 */
		@Deprecated
		public Builder showStubImage(int imageRes) {
			imageResOnLoading = imageRes;
			return this;
		}

		/**
		 * Incoming image will be displayed in {@link com.nostra13.universalimageloader.core.imageaware.ImageAware
		 * image aware view} during image loading
		 *
		 * @param imageRes Image resource
		 */
		public Builder showImageOnLoading(int imageRes) {
			imageResOnLoading = imageRes;
			return this;
		}

		/**
		 * Incoming drawable will be displayed in {@link com.nostra13.universalimageloader.core.imageaware.ImageAware
		 * image aware view} during image loading.
		 * This option will be ignored if {@link DisplayImageOptions.Builder#showImageOnLoading(int)} is set.
		 */
		public Builder showImageOnLoading(Drawable drawable) {
			imageOnLoading = drawable;
			return this;
		}

		/**
		 * Incoming image will be displayed in {@link com.nostra13.universalimageloader.core.imageaware.ImageAware
		 * image aware view} if empty URI (null or empty
		 * string) will be passed to <b>ImageLoader.displayImage(...)</b> method.
		 *
		 * @param imageRes Image resource
		 */
		public Builder showImageForEmptyUri(int imageRes) {
			imageResForEmptyUri = imageRes;
			return this;
		}

		/**
		 * Incoming drawable will be displayed in {@link com.nostra13.universalimageloader.core.imageaware.ImageAware
		 * image aware view} if empty URI (null or empty
		 * string) will be passed to <b>ImageLoader.displayImage(...)</b> method.
		 * This option will be ignored if {@link DisplayImageOptions.Builder#showImageForEmptyUri(int)} is set.
		 */
		public Builder showImageForEmptyUri(Drawable drawable) {
			imageForEmptyUri = drawable;
			return this;
		}

		/**
		 * Incoming image will be displayed in {@link com.nostra13.universalimageloader.core.imageaware.ImageAware
		 * image aware view} if some error occurs during
		 * requested image loading/decoding.
		 *
		 * @param imageRes Image resource
		 */
		public Builder showImageOnFail(int imageRes) {
			imageResOnFail = imageRes;
			return this;
		}

		/**
		 * Incoming drawable will be displayed in {@link com.nostra13.universalimageloader.core.imageaware.ImageAware
		 * image aware view} if some error occurs during
		 * requested image loading/decoding.
		 * This option will be ignored if {@link DisplayImageOptions.Builder#showImageOnFail(int)} is set.
		 */
		public Builder showImageOnFail(Drawable drawable) {
			imageOnFail = drawable;
			return this;
		}

		/**
		 * {@link com.nostra13.universalimageloader.core.imageaware.ImageAware
		 * image aware view} will be reset (set <b>null</b>) before image loading start
		 *
		 * @deprecated Use {@link #resetViewBeforeLoading(boolean) resetViewBeforeLoading(true)} instead
		 */
		public Builder resetViewBeforeLoading() {
			resetViewBeforeLoading = true;
			return this;
		}

		/**
		 * Sets whether {@link com.nostra13.universalimageloader.core.imageaware.ImageAware
		 * image aware view} will be reset (set <b>null</b>) before image loading start
		 */
		public Builder resetViewBeforeLoading(boolean resetViewBeforeLoading) {
			this.resetViewBeforeLoading = resetViewBeforeLoading;
			return this;
		}

		/**
		 * Loaded image will be cached in memory
		 *
		 * @deprecated Use {@link #cacheInMemory(boolean) cacheInMemory(true)} instead
		 */
		@Deprecated
		public Builder cacheInMemory() {
			cacheInMemory = true;
			return this;
		}

		/** Sets whether loaded image will be cached in memory */
		public Builder cacheInMemory(boolean cacheInMemory) {
			this.cacheInMemory = cacheInMemory;
			return this;
		}

		/**
		 * Loaded image will be cached on disk
		 *
		 * @deprecated Use {@link #cacheOnDisk(boolean) cacheOnDisk(true)} instead
		 */
		@Deprecated
		public Builder cacheOnDisc() {
			return cacheOnDisk(true);
		}

		/**
		 * Sets whether loaded image will be cached on disk
		 *
		 * @deprecated Use {@link #cacheOnDisk(boolean)} instead
		 */
		@Deprecated
		public Builder cacheOnDisc(boolean cacheOnDisk) {
			return cacheOnDisk(cacheOnDisk);
		}

		/** Sets whether loaded image will be cached on disk */
		public Builder cacheOnDisk(boolean cacheOnDisk) {
			this.cacheOnDisk = cacheOnDisk;
			return this;
		}

		/**
		 * Sets {@linkplain ImageScaleType scale type} for decoding image. This parameter is used while define scale
		 * size for decoding image to Bitmap. Default value - {@link ImageScaleType#IN_SAMPLE_POWER_OF_2}
		 */
		public Builder imageScaleType(ImageScaleType imageScaleType) {
			this.imageScaleType = imageScaleType;
			return this;
		}

		/** Sets {@link Bitmap.Config bitmap config} for image decoding. Default value - {@link Bitmap.Config#ARGB_8888} */
		public Builder bitmapConfig(Bitmap.Config bitmapConfig) {
			if (bitmapConfig == null) throw new IllegalArgumentException("bitmapConfig can't be null");
			decodingOptions.inPreferredConfig = bitmapConfig;
			return this;
		}

		/**
		 * Sets options for image decoding.<br />
		 * <b>NOTE:</b> {@link Options#inSampleSize} of incoming options will <b>NOT</b> be considered. Library
		 * calculate the most appropriate sample size itself according yo {@link #imageScaleType(ImageScaleType)}
		 * options.<br />
		 * <b>NOTE:</b> This option overlaps {@link #bitmapConfig(android.graphics.Bitmap.Config) bitmapConfig()}
		 * option.
		 */
		public Builder decodingOptions(Options decodingOptions) {
			if (decodingOptions == null) throw new IllegalArgumentException("decodingOptions can't be null");
			this.decodingOptions = decodingOptions;
			return this;
		}

		/** Sets delay time before starting loading task. Default - no delay. */
		public Builder delayBeforeLoading(int delayInMillis) {
			this.delayBeforeLoading = delayInMillis;
			return this;
		}

		/** Sets auxiliary object which will be passed to {@link ImageDownloader#getStream(String, Object)} */
		public Builder extraForDownloader(Object extra) {
			this.extraForDownloader = extra;
			return this;
		}

		/** Sets whether ImageLoader will consider EXIF parameters of JPEG image (rotate, flip) */
		public Builder considerExifParams(boolean considerExifParams) {
			this.considerExifParams = considerExifParams;
			return this;
		}

		/**
		 * Sets bitmap processor which will be process bitmaps before they will be cached in memory. So memory cache
		 * will contain bitmap processed by incoming preProcessor.<br />
		 * Image will be pre-processed even if caching in memory is disabled.
		 */
		public Builder preProcessor(BitmapProcessor preProcessor) {
			this.preProcessor = preProcessor;
			return this;
		}

		/**
		 * Sets bitmap processor which will be process bitmaps before they will be displayed in
		 * {@link com.nostra13.universalimageloader.core.imageaware.ImageAware image aware view} but
		 * after they'll have been saved in memory cache.
		 */
		public Builder postProcessor(BitmapProcessor postProcessor) {
			this.postProcessor = postProcessor;
			return this;
		}

		/**
		 * Sets custom {@link BitmapDisplayer displayer} for image loading task. Default value -
		 * {@link DefaultConfigurationFactory#createBitmapDisplayer()}
		 */
		public Builder displayer(BitmapDisplayer displayer) {
			if (displayer == null) throw new IllegalArgumentException("displayer can't be null");
			this.displayer = displayer;
			return this;
		}

		Builder syncLoading(boolean isSyncLoading) {
			this.isSyncLoading = isSyncLoading;
			return this;
		}

		/**
		 * Sets custom {@linkplain Handler handler} for displaying images and firing {@linkplain ImageLoadingListener
		 * listener} events.
		 */
		public Builder handler(Handler handler) {
			this.handler = handler;
			return this;
		}

		/** Sets all options equal to incoming options */
		public Builder cloneFrom(DisplayImageOptions options) {
			imageResOnLoading = options.imageResOnLoading;
			imageResForEmptyUri = options.imageResForEmptyUri;
			imageResOnFail = options.imageResOnFail;
			imageOnLoading = options.imageOnLoading;
			imageForEmptyUri = options.imageForEmptyUri;
			imageOnFail = options.imageOnFail;
			resetViewBeforeLoading = options.resetViewBeforeLoading;
			cacheInMemory = options.cacheInMemory;
			cacheOnDisk = options.cacheOnDisk;
			imageScaleType = options.imageScaleType;
			decodingOptions = options.decodingOptions;
			delayBeforeLoading = options.delayBeforeLoading;
			considerExifParams = options.considerExifParams;
			extraForDownloader = options.extraForDownloader;
			preProcessor = options.preProcessor;
			postProcessor = options.postProcessor;
			displayer = options.displayer;
			handler = options.handler;
			isSyncLoading = options.isSyncLoading;
			return this;
		}

		/** Builds configured {@link DisplayImageOptions} object */
		public DisplayImageOptions build() {
			return new DisplayImageOptions(this);
		}
	}

	/**
	 * Creates options appropriate for single displaying:
	 * <ul>
	 * <li>View will <b>not</b> be reset before loading</li>
	 * <li>Loaded image will <b>not</b> be cached in memory</li>
	 * <li>Loaded image will <b>not</b> be cached on disk</li>
	 * <li>{@link ImageScaleType#IN_SAMPLE_POWER_OF_2} decoding type will be used</li>
	 * <li>{@link Bitmap.Config#ARGB_8888} bitmap config will be used for image decoding</li>
	 * <li>{@link SimpleBitmapDisplayer} will be used for image displaying</li>
	 * </ul>
	 * <p/>
	 * These option are appropriate for simple single-use image (from drawables or from Internet) displaying.
	 */
	public static DisplayImageOptions createSimple() {
		return new Builder().build();
	}
}


================================================
FILE: library/src/main/java/com/nostra13/universalimageloader/core/ImageLoader.java
================================================
/*******************************************************************************
 * Copyright 2011-2014 Sergey Tarasevich
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.nostra13.universalimageloader.core;

import android.graphics.Bitmap;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;

import com.nostra13.universalimageloader.cache.disc.DiskCache;
import com.nostra13.universalimageloader.cache.memory.MemoryCache;
import com.nostra13.universalimageloader.core.assist.FailReason;
import com.nostra13.universalimageloader.core.assist.FlushedInputStream;
import com.nostra13.universalimageloader.core.assist.ImageSize;
import com.nostra13.universalimageloader.core.assist.LoadedFrom;
import com.nostra13.universalimageloader.core.assist.ViewScaleType;
import com.nostra13.universalimageloader.core.imageaware.ImageAware;
import com.nostra13.universalimageloader.core.imageaware.ImageViewAware;
import com.nostra13.universalimageloader.core.imageaware.NonViewAware;
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
import com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener;
import com.nostra13.universalimageloader.core.listener.SimpleImageLoadingListener;
import com.nostra13.universalimageloader.utils.ImageSizeUtils;
import com.nostra13.universalimageloader.utils.L;
import com.nostra13.universalimageloader.utils.MemoryCacheUtils;

/**
 * Singletone for image loading and displaying at {@link ImageView ImageViews}<br />
 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before any other method.
 *
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 * @since 1.0.0
 */
public class ImageLoader {

	public static final String TAG = ImageLoader.class.getSimpleName();

	static final String LOG_INIT_CONFIG = "Initialize ImageLoader with configuration";
	static final String LOG_DESTROY = "Destroy ImageLoader";
	static final String LOG_LOAD_IMAGE_FROM_MEMORY_CACHE = "Load image from memory cache [%s]";

	private static final String WARNING_RE_INIT_CONFIG = "Try to initialize ImageLoader which had already been initialized before. " + "To re-init ImageLoader with new configuration call ImageLoader.destroy() at first.";
	private static final String ERROR_WRONG_ARGUMENTS = "Wrong arguments were passed to displayImage() method (ImageView reference must not be null)";
	private static final String ERROR_NOT_INIT = "ImageLoader must be init with configuration before using";
	private static final String ERROR_INIT_CONFIG_WITH_NULL = "ImageLoader configuration can not be initialized with null";

	private ImageLoaderConfiguration configuration;
	private ImageLoaderEngine engine;

	private ImageLoadingListener defaultListener = new SimpleImageLoadingListener();

	private volatile static ImageLoader instance;

	/** Returns singleton class instance */
	public static ImageLoader getInstance() {
		if (instance == null) {
			synchronized (ImageLoader.class) {
				if (instance == null) {
					instance = new ImageLoader();
				}
			}
		}
		return instance;
	}

	protected ImageLoader() {
	}

	/**
	 * Initializes ImageLoader instance with configuration.<br />
	 * If configurations was set before ( {@link #isInited()} == true) then this method does nothing.<br />
	 * To force initialization with new configuration you should {@linkplain #destroy() destroy ImageLoader} at first.
	 *
	 * @param configuration {@linkplain ImageLoaderConfiguration ImageLoader configuration}
	 * @throws IllegalArgumentException if <b>configuration</b> parameter is null
	 */
	public synchronized void init(ImageLoaderConfiguration configuration) {
		if (configuration == null) {
			throw new IllegalArgumentException(ERROR_INIT_CONFIG_WITH_NULL);
		}
		if (this.configuration == null) {
			L.d(LOG_INIT_CONFIG);
			engine = new ImageLoaderEngine(configuration);
			this.configuration = configuration;
		} else {
			L.w(WARNING_RE_INIT_CONFIG);
		}
	}

	/**
	 * Returns <b>true</b> - if ImageLoader {@linkplain #init(ImageLoaderConfiguration) is initialized with
	 * configuration}; <b>false</b> - otherwise
	 */
	public boolean isInited() {
		return configuration != null;
	}

	/**
	 * Adds display image task to execution pool. Image will be set to ImageAware when it's turn. <br/>
	 * Default {@linkplain DisplayImageOptions display image options} from {@linkplain ImageLoaderConfiguration
	 * configuration} will be used.<br />
	 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
	 *
	 * @param uri        Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
	 * @param imageAware {@linkplain com.nostra13.universalimageloader.core.imageaware.ImageAware Image aware view}
	 *                   which should display image
	 * @throws IllegalStateException    if {@link #init(ImageLoaderConfiguration)} method wasn't called before
	 * @throws IllegalArgumentException if passed <b>imageAware</b> is null
	 */
	public void displayImage(String uri, ImageAware imageAware) {
		displayImage(uri, imageAware, null, null, null);
	}

	/**
	 * Adds display image task to execution pool. Image will be set to ImageAware when it's turn.<br />
	 * Default {@linkplain DisplayImageOptions display image options} from {@linkplain ImageLoaderConfiguration
	 * configuration} will be used.<br />
	 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
	 *
	 * @param uri        Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
	 * @param imageAware {@linkplain com.nostra13.universalimageloader.core.imageaware.ImageAware Image aware view}
	 *                   which should display image
	 * @param listener   {@linkplain ImageLoadingListener Listener} for image loading process. Listener fires events on
	 *                   UI thread if this method is called on UI thread.
	 * @throws IllegalStateException    if {@link #init(ImageLoaderConfiguration)} method wasn't called before
	 * @throws IllegalArgumentException if passed <b>imageAware</b> is null
	 */
	public void displayImage(String uri, ImageAware imageAware, ImageLoadingListener listener) {
		displayImage(uri, imageAware, null, listener, null);
	}

	/**
	 * Adds display image task to execution pool. Image will be set to ImageAware when it's turn.<br />
	 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
	 *
	 * @param uri        Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
	 * @param imageAware {@linkplain com.nostra13.universalimageloader.core.imageaware.ImageAware Image aware view}
	 *                   which should display image
	 * @param options    {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions Options} for image
	 *                   decoding and displaying. If <b>null</b> - default display image options
	 *                   {@linkplain ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(DisplayImageOptions)
	 *                   from configuration} will be used.
	 * @throws IllegalStateException    if {@link #init(ImageLoaderConfiguration)} method wasn't called before
	 * @throws IllegalArgumentException if passed <b>imageAware</b> is null
	 */
	public void displayImage(String uri, ImageAware imageAware, DisplayImageOptions options) {
		displayImage(uri, imageAware, options, null, null);
	}

	/**
	 * Adds display image task to execution pool. Image will be set to ImageAware when it's turn.<br />
	 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
	 *
	 * @param uri        Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
	 * @param imageAware {@linkplain com.nostra13.universalimageloader.core.imageaware.ImageAware Image aware view}
	 *                   which should display image
	 * @param options    {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions Options} for image
	 *                   decoding and displaying. If <b>null</b> - default display image options
	 *                   {@linkplain ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(DisplayImageOptions)
	 *                   from configuration} will be used.
	 * @param listener   {@linkplain ImageLoadingListener Listener} for image loading process. Listener fires events on
	 *                   UI thread if this method is called on UI thread.
	 * @throws IllegalStateException    if {@link #init(ImageLoaderConfiguration)} method wasn't called before
	 * @throws IllegalArgumentException if passed <b>imageAware</b> is null
	 */
	public void displayImage(String uri, ImageAware imageAware, DisplayImageOptions options,
			ImageLoadingListener listener) {
		displayImage(uri, imageAware, options, listener, null);
	}

	/**
	 * Adds display image task to execution pool. Image will be set to ImageAware when it's turn.<br />
	 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
	 *
	 * @param uri              Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
	 * @param imageAware       {@linkplain com.nostra13.universalimageloader.core.imageaware.ImageAware Image aware view}
	 *                         which should display image
	 * @param options          {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions Options} for image
	 *                         decoding and displaying. If <b>null</b> - default display image options
	 *                         {@linkplain ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(DisplayImageOptions)
	 *                         from configuration} will be used.
	 * @param listener         {@linkplain ImageLoadingListener Listener} for image loading process. Listener fires
	 *                         events on UI thread if this method is called on UI thread.
	 * @param progressListener {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener
	 *                         Listener} for image loading progress. Listener fires events on UI thread if this method
	 *                         is called on UI thread. Caching on disk should be enabled in
	 *                         {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions options} to make
	 *                         this listener work.
	 * @throws IllegalStateException    if {@link #init(ImageLoaderConfiguration)} method wasn't called before
	 * @throws IllegalArgumentException if passed <b>imageAware</b> is null
	 */
	public void displayImage(String uri, ImageAware imageAware, DisplayImageOptions options,
			ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
		displayImage(uri, imageAware, options, null, listener, progressListener);
	}

	/**
	 * Adds display image task to execution pool. Image will be set to ImageAware when it's turn.<br />
	 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
	 *
	 * @param uri              Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
	 * @param imageAware      
Download .txt
gitextract_mm0i5r2z/

├── .github/
│   └── workflows/
│       └── gradle-wrapper-validation.yml
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── LICENSE
├── README.md
├── build.gradle
├── downloads/
│   ├── universal-image-loader-1.9.5-javadoc.jar
│   ├── universal-image-loader-1.9.5-sources.jar
│   └── universal-image-loader-1.9.5.jar
├── gradle/
│   ├── maven_push.gradle
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── library/
│   ├── build.gradle
│   ├── gradle.properties
│   ├── project.properties
│   └── src/
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   └── java/
│       │       └── com/
│       │           └── nostra13/
│       │               └── universalimageloader/
│       │                   ├── cache/
│       │                   │   ├── disc/
│       │                   │   │   ├── DiskCache.java
│       │                   │   │   ├── impl/
│       │                   │   │   │   ├── BaseDiskCache.java
│       │                   │   │   │   ├── LimitedAgeDiskCache.java
│       │                   │   │   │   ├── UnlimitedDiskCache.java
│       │                   │   │   │   └── ext/
│       │                   │   │   │       ├── DiskLruCache.java
│       │                   │   │   │       ├── LruDiskCache.java
│       │                   │   │   │       ├── StrictLineReader.java
│       │                   │   │   │       └── Util.java
│       │                   │   │   └── naming/
│       │                   │   │       ├── FileNameGenerator.java
│       │                   │   │       ├── HashCodeFileNameGenerator.java
│       │                   │   │       └── Md5FileNameGenerator.java
│       │                   │   └── memory/
│       │                   │       ├── BaseMemoryCache.java
│       │                   │       ├── LimitedMemoryCache.java
│       │                   │       ├── MemoryCache.java
│       │                   │       └── impl/
│       │                   │           ├── FIFOLimitedMemoryCache.java
│       │                   │           ├── FuzzyKeyMemoryCache.java
│       │                   │           ├── LRULimitedMemoryCache.java
│       │                   │           ├── LargestLimitedMemoryCache.java
│       │                   │           ├── LimitedAgeMemoryCache.java
│       │                   │           ├── LruMemoryCache.java
│       │                   │           ├── UsingFreqLimitedMemoryCache.java
│       │                   │           └── WeakMemoryCache.java
│       │                   ├── core/
│       │                   │   ├── DefaultConfigurationFactory.java
│       │                   │   ├── DisplayBitmapTask.java
│       │                   │   ├── DisplayImageOptions.java
│       │                   │   ├── ImageLoader.java
│       │                   │   ├── ImageLoaderConfiguration.java
│       │                   │   ├── ImageLoaderEngine.java
│       │                   │   ├── ImageLoadingInfo.java
│       │                   │   ├── LoadAndDisplayImageTask.java
│       │                   │   ├── ProcessAndDisplayImageTask.java
│       │                   │   ├── assist/
│       │                   │   │   ├── ContentLengthInputStream.java
│       │                   │   │   ├── FailReason.java
│       │                   │   │   ├── FlushedInputStream.java
│       │                   │   │   ├── ImageScaleType.java
│       │                   │   │   ├── ImageSize.java
│       │                   │   │   ├── LoadedFrom.java
│       │                   │   │   ├── QueueProcessingType.java
│       │                   │   │   ├── ViewScaleType.java
│       │                   │   │   └── deque/
│       │                   │   │       ├── BlockingDeque.java
│       │                   │   │       ├── Deque.java
│       │                   │   │       ├── LIFOLinkedBlockingDeque.java
│       │                   │   │       └── LinkedBlockingDeque.java
│       │                   │   ├── decode/
│       │                   │   │   ├── BaseImageDecoder.java
│       │                   │   │   ├── ImageDecoder.java
│       │                   │   │   └── ImageDecodingInfo.java
│       │                   │   ├── display/
│       │                   │   │   ├── BitmapDisplayer.java
│       │                   │   │   ├── CircleBitmapDisplayer.java
│       │                   │   │   ├── FadeInBitmapDisplayer.java
│       │                   │   │   ├── RoundedBitmapDisplayer.java
│       │                   │   │   ├── RoundedVignetteBitmapDisplayer.java
│       │                   │   │   └── SimpleBitmapDisplayer.java
│       │                   │   ├── download/
│       │                   │   │   ├── BaseImageDownloader.java
│       │                   │   │   └── ImageDownloader.java
│       │                   │   ├── imageaware/
│       │                   │   │   ├── ImageAware.java
│       │                   │   │   ├── ImageViewAware.java
│       │                   │   │   ├── NonViewAware.java
│       │                   │   │   └── ViewAware.java
│       │                   │   ├── listener/
│       │                   │   │   ├── ImageLoadingListener.java
│       │                   │   │   ├── ImageLoadingProgressListener.java
│       │                   │   │   ├── PauseOnScrollListener.java
│       │                   │   │   └── SimpleImageLoadingListener.java
│       │                   │   └── process/
│       │                   │       └── BitmapProcessor.java
│       │                   └── utils/
│       │                       ├── DiskCacheUtils.java
│       │                       ├── ImageSizeUtils.java
│       │                       ├── IoUtils.java
│       │                       ├── L.java
│       │                       ├── MemoryCacheUtils.java
│       │                       └── StorageUtils.java
│       └── test/
│           └── java/
│               └── com/
│                   └── nostra13/
│                       └── universalimageloader/
│                           └── core/
│                               ├── assist/
│                               │   └── ImageSizeTest.java
│                               └── download/
│                                   └── BaseImageDownloaderTest.java
├── sample/
│   ├── build.gradle
│   ├── gradle.properties
│   ├── project.properties
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── nostra13/
│           │           └── universalimageloader/
│           │               └── sample/
│           │                   ├── Constants.java
│           │                   ├── UILApplication.java
│           │                   ├── activity/
│           │                   │   ├── ComplexImageActivity.java
│           │                   │   ├── HomeActivity.java
│           │                   │   └── SimpleImageActivity.java
│           │                   ├── ext/
│           │                   │   ├── Base64ImageDownloader.java
│           │                   │   ├── BrokenJpegImageDecoder.java
│           │                   │   ├── HttpClientImageDownloader.java
│           │                   │   ├── OkHttpImageDownloader.java
│           │                   │   └── OldRoundedBitmapDisplayer.java
│           │                   ├── fragment/
│           │                   │   ├── AbsListViewBaseFragment.java
│           │                   │   ├── BaseFragment.java
│           │                   │   ├── ImageGalleryFragment.java
│           │                   │   ├── ImageGridFragment.java
│           │                   │   ├── ImageListFragment.java
│           │                   │   └── ImagePagerFragment.java
│           │                   └── widget/
│           │                       └── UILWidgetProvider.java
│           └── res/
│               ├── layout/
│               │   ├── ac_complex.xml
│               │   ├── ac_home.xml
│               │   ├── fr_image_gallery.xml
│               │   ├── fr_image_grid.xml
│               │   ├── fr_image_list.xml
│               │   ├── fr_image_pager.xml
│               │   ├── item_gallery_image.xml
│               │   ├── item_grid_image.xml
│               │   ├── item_list_image.xml
│               │   ├── item_pager_image.xml
│               │   └── widget.xml
│               ├── menu/
│               │   └── main_menu.xml
│               ├── values/
│               │   ├── strings.xml
│               │   └── styles.xml
│               ├── values-v11/
│               │   └── styles.xml
│               └── xml/
│                   └── widget_provider.xml
└── settings.gradle
Download .txt
SYMBOL INDEX (919 symbols across 88 files)

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/DiskCache.java
  type DiskCache (line 31) | public interface DiskCache {
    method getDirectory (line 37) | File getDirectory();
    method get (line 45) | File get(String imageUri);
    method save (line 59) | boolean save(String imageUri, InputStream imageStream, IoUtils.CopyLis...
    method save (line 69) | boolean save(String imageUri, Bitmap bitmap) throws IOException;
    method remove (line 78) | boolean remove(String imageUri);
    method close (line 81) | void close();
    method clear (line 84) | void clear();

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/BaseDiskCache.java
  class BaseDiskCache (line 38) | public abstract class BaseDiskCache implements DiskCache {
    method BaseDiskCache (line 60) | public BaseDiskCache(File cacheDir) {
    method BaseDiskCache (line 68) | public BaseDiskCache(File cacheDir, File reserveCacheDir) {
    method BaseDiskCache (line 78) | public BaseDiskCache(File cacheDir, File reserveCacheDir, FileNameGene...
    method getDirectory (line 91) | @Override
    method get (line 96) | @Override
    method save (line 101) | @Override
    method save (line 124) | @Override
    method remove (line 145) | @Override
    method close (line 150) | @Override
    method clear (line 155) | @Override
    method getFile (line 166) | protected File getFile(String imageUri) {
    method setBufferSize (line 177) | public void setBufferSize(int bufferSize) {
    method setCompressFormat (line 181) | public void setCompressFormat(Bitmap.CompressFormat compressFormat) {
    method setCompressQuality (line 185) | public void setCompressQuality(int compressQuality) {

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/LimitedAgeDiskCache.java
  class LimitedAgeDiskCache (line 36) | public class LimitedAgeDiskCache extends BaseDiskCache {
    method LimitedAgeDiskCache (line 47) | public LimitedAgeDiskCache(File cacheDir, long maxAge) {
    method LimitedAgeDiskCache (line 56) | public LimitedAgeDiskCache(File cacheDir, File reserveCacheDir, long m...
    method LimitedAgeDiskCache (line 67) | public LimitedAgeDiskCache(File cacheDir, File reserveCacheDir, FileNa...
    method get (line 72) | @Override
    method save (line 95) | @Override
    method save (line 102) | @Override
    method remove (line 109) | @Override
    method clear (line 115) | @Override
    method rememberUsage (line 121) | private void rememberUsage(String imageUri) {

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/UnlimitedDiskCache.java
  class UnlimitedDiskCache (line 29) | public class UnlimitedDiskCache extends BaseDiskCache {
    method UnlimitedDiskCache (line 31) | public UnlimitedDiskCache(File cacheDir) {
    method UnlimitedDiskCache (line 39) | public UnlimitedDiskCache(File cacheDir, File reserveCacheDir) {
    method UnlimitedDiskCache (line 49) | public UnlimitedDiskCache(File cacheDir, File reserveCacheDir, FileNam...

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/ext/DiskLruCache.java
  class DiskLruCache (line 87) | final class DiskLruCache implements Closeable {
    method call (line 166) | public Void call() throws Exception {
    method DiskLruCache (line 182) | private DiskLruCache(File directory, int appVersion, int valueCount, l...
    method open (line 203) | public static DiskLruCache open(File directory, int appVersion, int va...
    method readJournal (line 254) | private void readJournal() throws IOException {
    method readJournalLine (line 286) | private void readJournalLine(String line) throws IOException {
    method processJournal (line 329) | private void processJournal() throws IOException {
    method rebuildJournal (line 353) | private synchronized void rebuildJournal() throws IOException {
    method deleteIfExists (line 392) | private static void deleteIfExists(File file) throws IOException {
    method renameTo (line 398) | private static void renameTo(File from, File to, boolean deleteDestina...
    method get (line 412) | public synchronized Snapshot get(String key) throws IOException {
    method edit (line 461) | public Editor edit(String key) throws IOException {
    method edit (line 465) | private synchronized Editor edit(String key, long expectedSequenceNumb...
    method getDirectory (line 490) | public File getDirectory() {
    method getMaxSize (line 498) | public synchronized long getMaxSize() {
    method getMaxFileCount (line 503) | public synchronized int getMaxFileCount() {
    method setMaxSize (line 511) | public synchronized void setMaxSize(long maxSize) {
    method size (line 521) | public synchronized long size() {
    method fileCount (line 530) | public synchronized long fileCount() {
    method completeEdit (line 534) | private synchronized void completeEdit(Editor editor, boolean success)...
    method journalRebuildRequired (line 594) | private boolean journalRebuildRequired() {
    method remove (line 606) | public synchronized boolean remove(String key) throws IOException {
    method isClosed (line 636) | public synchronized boolean isClosed() {
    method checkNotClosed (line 640) | private void checkNotClosed() {
    method flush (line 647) | public synchronized void flush() throws IOException {
    method close (line 655) | public synchronized void close() throws IOException {
    method trimToSize (line 670) | private void trimToSize() throws IOException {
    method trimToFileCount (line 677) | private void trimToFileCount() throws IOException {
    method delete (line 689) | public void delete() throws IOException {
    method validateKey (line 694) | private void validateKey(String key) {
    method inputStreamToString (line 701) | private static String inputStreamToString(InputStream in) throws IOExc...
    class Snapshot (line 706) | public final class Snapshot implements Closeable {
      method Snapshot (line 713) | private Snapshot(String key, long sequenceNumber, File[] files, Inpu...
      method edit (line 726) | public Editor edit() throws IOException {
      method getFile (line 731) | public File getFile(int index) {
      method getInputStream (line 736) | public InputStream getInputStream(int index) {
      method getString (line 741) | public String getString(int index) throws IOException {
      method getLength (line 746) | public long getLength(int index) {
      method close (line 750) | public void close() {
    method write (line 758) | @Override
    class Editor (line 765) | public final class Editor {
      method Editor (line 771) | private Editor(Entry entry) {
      method newInputStream (line 780) | public InputStream newInputStream(int index) throws IOException {
      method getString (line 800) | public String getString(int index) throws IOException {
      method newOutputStream (line 812) | public OutputStream newOutputStream(int index) throws IOException {
      method set (line 839) | public void set(int index, String value) throws IOException {
      method commit (line 853) | public void commit() throws IOException {
      method abort (line 867) | public void abort() throws IOException {
      method abortUnlessCommitted (line 871) | public void abortUnlessCommitted() {
      class FaultHidingOutputStream (line 880) | private class FaultHidingOutputStream extends FilterOutputStream {
        method FaultHidingOutputStream (line 881) | private FaultHidingOutputStream(OutputStream out) {
        method write (line 885) | @Override public void write(int oneByte) {
        method write (line 893) | @Override public void write(byte[] buffer, int offset, int length) {
        method close (line 901) | @Override public void close() {
        method flush (line 909) | @Override public void flush() {
    class Entry (line 919) | private final class Entry {
      method Entry (line 934) | private Entry(String key) {
      method getLengths (line 939) | public String getLengths() throws IOException {
      method setLengths (line 948) | private void setLengths(String[] strings) throws IOException {
      method invalidLengths (line 962) | private IOException invalidLengths(String[] strings) throws IOExcept...
      method getCleanFile (line 966) | public File getCleanFile(int i) {
      method getDirtyFile (line 970) | public File getDirtyFile(int i) {

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/ext/LruDiskCache.java
  class LruDiskCache (line 39) | public class LruDiskCache implements DiskCache {
    method LruDiskCache (line 68) | public LruDiskCache(File cacheDir, FileNameGenerator fileNameGenerator...
    method LruDiskCache (line 82) | public LruDiskCache(File cacheDir, File reserveCacheDir, FileNameGener...
    method initCache (line 109) | private void initCache(File cacheDir, File reserveCacheDir, long cache...
    method getDirectory (line 124) | @Override
    method get (line 129) | @Override
    method save (line 145) | @Override
    method save (line 167) | @Override
    method remove (line 189) | @Override
    method close (line 199) | @Override
    method clear (line 209) | @Override
    method getKey (line 223) | private String getKey(String imageUri) {
    method setBufferSize (line 227) | public void setBufferSize(int bufferSize) {
    method setCompressFormat (line 231) | public void setCompressFormat(Bitmap.CompressFormat compressFormat) {
    method setCompressQuality (line 235) | public void setCompressQuality(int compressQuality) {

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/ext/StrictLineReader.java
  class StrictLineReader (line 44) | class StrictLineReader implements Closeable {
    method StrictLineReader (line 70) | public StrictLineReader(InputStream in, Charset charset) {
    method StrictLineReader (line 85) | public StrictLineReader(InputStream in, int capacity, Charset charset) {
    method close (line 107) | public void close() throws IOException {
    method readLine (line 124) | public String readLine() throws IOException {
    method fillBuf (line 182) | private void fillBuf() throws IOException {

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/ext/Util.java
  class Util (line 26) | final class Util {
    method Util (line 30) | private Util() {
    method readFully (line 33) | static String readFully(Reader reader) throws IOException {
    method deleteContents (line 51) | static void deleteContents(File dir) throws IOException {
    method closeQuietly (line 66) | static void closeQuietly(/*Auto*/Closeable closeable) {

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/naming/FileNameGenerator.java
  type FileNameGenerator (line 24) | public interface FileNameGenerator {
    method generate (line 27) | String generate(String imageUri);

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/naming/HashCodeFileNameGenerator.java
  class HashCodeFileNameGenerator (line 24) | public class HashCodeFileNameGenerator implements FileNameGenerator {
    method generate (line 25) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/disc/naming/Md5FileNameGenerator.java
  class Md5FileNameGenerator (line 30) | public class Md5FileNameGenerator implements FileNameGenerator {
    method generate (line 35) | @Override
    method getMD5 (line 42) | private byte[] getMD5(byte[] data) {

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/BaseMemoryCache.java
  class BaseMemoryCache (line 30) | public abstract class BaseMemoryCache implements MemoryCache {
    method get (line 35) | @Override
    method put (line 45) | @Override
    method remove (line 51) | @Override
    method keys (line 57) | @Override
    method clear (line 64) | @Override
    method createReference (line 70) | protected abstract Reference<Bitmap> createReference(Bitmap value);

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/LimitedMemoryCache.java
  class LimitedMemoryCache (line 38) | public abstract class LimitedMemoryCache extends BaseMemoryCache {
    method LimitedMemoryCache (line 55) | public LimitedMemoryCache(int sizeLimit) {
    method put (line 63) | @Override
    method remove (line 87) | @Override
    method clear (line 98) | @Override
    method getSizeLimit (line 105) | protected int getSizeLimit() {
    method getSize (line 109) | protected abstract int getSize(Bitmap value);
    method removeNext (line 111) | protected abstract Bitmap removeNext();

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/MemoryCache.java
  type MemoryCache (line 28) | public interface MemoryCache {
    method put (line 35) | boolean put(String key, Bitmap value);
    method get (line 38) | Bitmap get(String key);
    method remove (line 41) | Bitmap remove(String key);
    method keys (line 44) | Collection<String> keys();
    method clear (line 47) | void clear();

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/FIFOLimitedMemoryCache.java
  class FIFOLimitedMemoryCache (line 37) | public class FIFOLimitedMemoryCache extends LimitedMemoryCache {
    method FIFOLimitedMemoryCache (line 41) | public FIFOLimitedMemoryCache(int sizeLimit) {
    method put (line 45) | @Override
    method remove (line 55) | @Override
    method clear (line 64) | @Override
    method getSize (line 70) | @Override
    method removeNext (line 75) | @Override
    method createReference (line 80) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/FuzzyKeyMemoryCache.java
  class FuzzyKeyMemoryCache (line 34) | public class FuzzyKeyMemoryCache implements MemoryCache {
    method FuzzyKeyMemoryCache (line 39) | public FuzzyKeyMemoryCache(MemoryCache cache, Comparator<String> keyCo...
    method put (line 44) | @Override
    method get (line 62) | @Override
    method remove (line 67) | @Override
    method clear (line 72) | @Override
    method keys (line 77) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/LRULimitedMemoryCache.java
  class LRULimitedMemoryCache (line 39) | public class LRULimitedMemoryCache extends LimitedMemoryCache {
    method LRULimitedMemoryCache (line 48) | public LRULimitedMemoryCache(int maxSize) {
    method put (line 52) | @Override
    method get (line 62) | @Override
    method remove (line 68) | @Override
    method clear (line 74) | @Override
    method getSize (line 80) | @Override
    method removeNext (line 85) | @Override
    method createReference (line 99) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/LargestLimitedMemoryCache.java
  class LargestLimitedMemoryCache (line 40) | public class LargestLimitedMemoryCache extends LimitedMemoryCache {
    method LargestLimitedMemoryCache (line 48) | public LargestLimitedMemoryCache(int sizeLimit) {
    method put (line 52) | @Override
    method remove (line 62) | @Override
    method clear (line 71) | @Override
    method getSize (line 77) | @Override
    method removeNext (line 82) | @Override
    method createReference (line 105) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/LimitedAgeMemoryCache.java
  class LimitedAgeMemoryCache (line 35) | public class LimitedAgeMemoryCache implements MemoryCache {
    method LimitedAgeMemoryCache (line 47) | public LimitedAgeMemoryCache(MemoryCache cache, long maxAge) {
    method put (line 52) | @Override
    method get (line 61) | @Override
    method remove (line 72) | @Override
    method keys (line 78) | @Override
    method clear (line 83) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/LruMemoryCache.java
  class LruMemoryCache (line 22) | public class LruMemoryCache implements MemoryCache {
    method LruMemoryCache (line 31) | public LruMemoryCache(int maxSize) {
    method get (line 43) | @Override
    method put (line 55) | @Override
    method trimToSize (line 78) | private void trimToSize(int maxSize) {
    method remove (line 104) | @Override
    method keys (line 119) | @Override
    method clear (line 126) | @Override
    method sizeOf (line 136) | private int sizeOf(String key, Bitmap value) {
    method toString (line 140) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/UsingFreqLimitedMemoryCache.java
  class UsingFreqLimitedMemoryCache (line 40) | public class UsingFreqLimitedMemoryCache extends LimitedMemoryCache {
    method UsingFreqLimitedMemoryCache (line 48) | public UsingFreqLimitedMemoryCache(int sizeLimit) {
    method put (line 52) | @Override
    method get (line 62) | @Override
    method remove (line 75) | @Override
    method clear (line 84) | @Override
    method getSize (line 90) | @Override
    method removeNext (line 95) | @Override
    method createReference (line 118) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/WeakMemoryCache.java
  class WeakMemoryCache (line 32) | public class WeakMemoryCache extends BaseMemoryCache {
    method createReference (line 33) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/DefaultConfigurationFactory.java
  class DefaultConfigurationFactory (line 58) | public class DefaultConfigurationFactory {
    method createExecutor (line 61) | public static Executor createExecutor(int threadPoolSize, int threadPr...
    method createTaskDistributor (line 71) | public static Executor createTaskDistributor() {
    method createFileNameGenerator (line 76) | public static FileNameGenerator createFileNameGenerator() {
    method createDiskCache (line 83) | public static DiskCache createDiskCache(Context context, FileNameGener...
    method createReserveDiskCacheDir (line 101) | private static File createReserveDiskCacheDir(Context context) {
    method createMemoryCache (line 114) | public static MemoryCache createMemoryCache(Context context, int memor...
    method hasHoneycomb (line 126) | private static boolean hasHoneycomb() {
    method isLargeHeap (line 130) | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    method getLargeMemoryClass (line 135) | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    method createImageDownloader (line 141) | public static ImageDownloader createImageDownloader(Context context) {
    method createImageDecoder (line 146) | public static ImageDecoder createImageDecoder(boolean loggingEnabled) {
    method createBitmapDisplayer (line 151) | public static BitmapDisplayer createBitmapDisplayer() {
    method createThreadFactory (line 156) | private static ThreadFactory createThreadFactory(int threadPriority, S...
    class DefaultThreadFactory (line 160) | private static class DefaultThreadFactory implements ThreadFactory {
      method DefaultThreadFactory (line 169) | DefaultThreadFactory(int threadPriority, String threadNamePrefix) {
      method newThread (line 175) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/DisplayBitmapTask.java
  class DisplayBitmapTask (line 33) | final class DisplayBitmapTask implements Runnable {
    method DisplayBitmapTask (line 48) | public DisplayBitmapTask(Bitmap bitmap, ImageLoadingInfo imageLoadingI...
    method run (line 60) | @Override
    method isViewWasReused (line 77) | private boolean isViewWasReused() {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/DisplayImageOptions.java
  class DisplayImageOptions (line 65) | public final class DisplayImageOptions {
    method DisplayImageOptions (line 87) | private DisplayImageOptions(Builder builder) {
    method shouldShowImageOnLoading (line 109) | public boolean shouldShowImageOnLoading() {
    method shouldShowImageForEmptyUri (line 113) | public boolean shouldShowImageForEmptyUri() {
    method shouldShowImageOnFail (line 117) | public boolean shouldShowImageOnFail() {
    method shouldPreProcess (line 121) | public boolean shouldPreProcess() {
    method shouldPostProcess (line 125) | public boolean shouldPostProcess() {
    method shouldDelayBeforeLoading (line 129) | public boolean shouldDelayBeforeLoading() {
    method getImageOnLoading (line 133) | public Drawable getImageOnLoading(Resources res) {
    method getImageForEmptyUri (line 137) | public Drawable getImageForEmptyUri(Resources res) {
    method getImageOnFail (line 141) | public Drawable getImageOnFail(Resources res) {
    method isResetViewBeforeLoading (line 145) | public boolean isResetViewBeforeLoading() {
    method isCacheInMemory (line 149) | public boolean isCacheInMemory() {
    method isCacheOnDisk (line 153) | public boolean isCacheOnDisk() {
    method getImageScaleType (line 157) | public ImageScaleType getImageScaleType() {
    method getDecodingOptions (line 161) | public Options getDecodingOptions() {
    method getDelayBeforeLoading (line 165) | public int getDelayBeforeLoading() {
    method isConsiderExifParams (line 169) | public boolean isConsiderExifParams() {
    method getExtraForDownloader (line 173) | public Object getExtraForDownloader() {
    method getPreProcessor (line 177) | public BitmapProcessor getPreProcessor() {
    method getPostProcessor (line 181) | public BitmapProcessor getPostProcessor() {
    method getDisplayer (line 185) | public BitmapDisplayer getDisplayer() {
    method getHandler (line 189) | public Handler getHandler() {
    method isSyncLoading (line 193) | boolean isSyncLoading() {
    class Builder (line 202) | public static class Builder {
      method showStubImage (line 230) | @Deprecated
      method showImageOnLoading (line 242) | public Builder showImageOnLoading(int imageRes) {
      method showImageOnLoading (line 252) | public Builder showImageOnLoading(Drawable drawable) {
      method showImageForEmptyUri (line 264) | public Builder showImageForEmptyUri(int imageRes) {
      method showImageForEmptyUri (line 275) | public Builder showImageForEmptyUri(Drawable drawable) {
      method showImageOnFail (line 287) | public Builder showImageOnFail(int imageRes) {
      method showImageOnFail (line 298) | public Builder showImageOnFail(Drawable drawable) {
      method resetViewBeforeLoading (line 309) | public Builder resetViewBeforeLoading() {
      method resetViewBeforeLoading (line 318) | public Builder resetViewBeforeLoading(boolean resetViewBeforeLoading) {
      method cacheInMemory (line 328) | @Deprecated
      method cacheInMemory (line 335) | public Builder cacheInMemory(boolean cacheInMemory) {
      method cacheOnDisc (line 345) | @Deprecated
      method cacheOnDisc (line 355) | @Deprecated
      method cacheOnDisk (line 361) | public Builder cacheOnDisk(boolean cacheOnDisk) {
      method imageScaleType (line 370) | public Builder imageScaleType(ImageScaleType imageScaleType) {
      method bitmapConfig (line 376) | public Builder bitmapConfig(Bitmap.Config bitmapConfig) {
      method decodingOptions (line 390) | public Builder decodingOptions(Options decodingOptions) {
      method delayBeforeLoading (line 397) | public Builder delayBeforeLoading(int delayInMillis) {
      method extraForDownloader (line 403) | public Builder extraForDownloader(Object extra) {
      method considerExifParams (line 409) | public Builder considerExifParams(boolean considerExifParams) {
      method preProcessor (line 419) | public Builder preProcessor(BitmapProcessor preProcessor) {
      method postProcessor (line 429) | public Builder postProcessor(BitmapProcessor postProcessor) {
      method displayer (line 438) | public Builder displayer(BitmapDisplayer displayer) {
      method syncLoading (line 444) | Builder syncLoading(boolean isSyncLoading) {
      method handler (line 453) | public Builder handler(Handler handler) {
      method cloneFrom (line 459) | public Builder cloneFrom(DisplayImageOptions options) {
      method build (line 483) | public DisplayImageOptions build() {
    method createSimple (line 501) | public static DisplayImageOptions createSimple() {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/ImageLoader.java
  class ImageLoader (line 49) | public class ImageLoader {
    method getInstance (line 70) | public static ImageLoader getInstance() {
    method ImageLoader (line 81) | protected ImageLoader() {
    method init (line 92) | public synchronized void init(ImageLoaderConfiguration configuration) {
    method isInited (line 109) | public boolean isInited() {
    method displayImage (line 125) | public void displayImage(String uri, ImageAware imageAware) {
    method displayImage (line 143) | public void displayImage(String uri, ImageAware imageAware, ImageLoadi...
    method displayImage (line 161) | public void displayImage(String uri, ImageAware imageAware, DisplayIma...
    method displayImage (line 181) | public void displayImage(String uri, ImageAware imageAware, DisplayIma...
    method displayImage (line 207) | public void displayImage(String uri, ImageAware imageAware, DisplayIma...
    method displayImage (line 234) | public void displayImage(String uri, ImageAware imageAware, DisplayIma...
    method displayImage (line 315) | public void displayImage(String uri, ImageView imageView) {
    method displayImage (line 330) | public void displayImage(String uri, ImageView imageView, ImageSize ta...
    method displayImage (line 347) | public void displayImage(String uri, ImageView imageView, DisplayImage...
    method displayImage (line 364) | public void displayImage(String uri, ImageView imageView, ImageLoading...
    method displayImage (line 383) | public void displayImage(String uri, ImageView imageView, DisplayImage...
    method displayImage (line 408) | public void displayImage(String uri, ImageView imageView, DisplayImage...
    method loadImage (line 424) | public void loadImage(String uri, ImageLoadingListener listener) {
    method loadImage (line 444) | public void loadImage(String uri, ImageSize targetImageSize, ImageLoad...
    method loadImage (line 463) | public void loadImage(String uri, DisplayImageOptions options, ImageLo...
    method loadImage (line 487) | public void loadImage(String uri, ImageSize targetImageSize, DisplayIm...
    method loadImage (line 517) | public void loadImage(String uri, ImageSize targetImageSize, DisplayIm...
    method loadImageSync (line 542) | public Bitmap loadImageSync(String uri) {
    method loadImageSync (line 558) | public Bitmap loadImageSync(String uri, DisplayImageOptions options) {
    method loadImageSync (line 576) | public Bitmap loadImageSync(String uri, ImageSize targetImageSize) {
    method loadImageSync (line 595) | public Bitmap loadImageSync(String uri, ImageSize targetImageSize, Dis...
    method checkConfiguration (line 611) | private void checkConfiguration() {
    method setDefaultLoadingListener (line 618) | public void setDefaultLoadingListener(ImageLoadingListener listener) {
    method getMemoryCache (line 627) | public MemoryCache getMemoryCache() {
    method clearMemoryCache (line 637) | public void clearMemoryCache() {
    method getDiscCache (line 648) | @Deprecated
    method getDiskCache (line 658) | public DiskCache getDiskCache() {
    method clearDiscCache (line 669) | @Deprecated
    method clearDiskCache (line 679) | public void clearDiskCache() {
    method getLoadingUriForView (line 688) | public String getLoadingUriForView(ImageAware imageAware) {
    method getLoadingUriForView (line 696) | public String getLoadingUriForView(ImageView imageView) {
    method cancelDisplayTask (line 707) | public void cancelDisplayTask(ImageAware imageAware) {
    method cancelDisplayTask (line 717) | public void cancelDisplayTask(ImageView imageView) {
    method denyNetworkDownloads (line 731) | public void denyNetworkDownloads(boolean denyNetworkDownloads) {
    method handleSlowNetwork (line 742) | public void handleSlowNetwork(boolean handleSlowNetwork) {
    method pause (line 751) | public void pause() {
    method resume (line 760) | public void resume() {
    method stop (line 775) | public void stop() {
    method destroy (line 788) | public void destroy() {
    method defineHandler (line 800) | private static Handler defineHandler(DisplayImageOptions options) {
    class SyncImageLoadingListener (line 816) | private static class SyncImageLoadingListener extends SimpleImageLoadi...
      method onLoadingComplete (line 820) | @Override
      method getLoadedBitmap (line 825) | public Bitmap getLoadedBitmap() {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/ImageLoaderConfiguration.java
  class ImageLoaderConfiguration (line 50) | public final class ImageLoaderConfiguration {
    method ImageLoaderConfiguration (line 78) | private ImageLoaderConfiguration(final Builder builder) {
    method createDefault (line 126) | public static ImageLoaderConfiguration createDefault(Context context) {
    method getMaxImageSize (line 130) | ImageSize getMaxImageSize() {
    class Builder (line 149) | public static class Builder {
      method Builder (line 195) | public Builder(Context context) {
      method memoryCacheExtraOptions (line 207) | public Builder memoryCacheExtraOptions(int maxImageWidthForMemoryCac...
      method discCacheExtraOptions (line 218) | @Deprecated
      method diskCacheExtraOptions (line 232) | public Builder diskCacheExtraOptions(int maxImageWidthForDiskCache, ...
      method taskExecutor (line 253) | public Builder taskExecutor(Executor executor) {
      method taskExecutorForCachedImages (line 280) | public Builder taskExecutorForCachedImages(Executor executorForCache...
      method threadPoolSize (line 293) | public Builder threadPoolSize(int threadPoolSize) {
      method threadPriority (line 307) | public Builder threadPriority(int threadPriority) {
      method denyCacheImageMultipleSizesInMemory (line 332) | public Builder denyCacheImageMultipleSizesInMemory() {
      method tasksProcessingOrder (line 341) | public Builder tasksProcessingOrder(QueueProcessingType tasksProcess...
      method memoryCacheSize (line 358) | public Builder memoryCacheSize(int memoryCacheSize) {
      method memoryCacheSizePercentage (line 378) | public Builder memoryCacheSizePercentage(int availableMemoryPercent) {
      method memoryCache (line 402) | public Builder memoryCache(MemoryCache memoryCache) {
      method discCacheSize (line 412) | @Deprecated
      method diskCacheSize (line 425) | public Builder diskCacheSize(int maxCacheSize) {
      method discCacheFileCount (line 437) | @Deprecated
      method diskCacheFileCount (line 450) | public Builder diskCacheFileCount(int maxFileCount) {
      method discCacheFileNameGenerator (line 462) | @Deprecated
      method diskCacheFileNameGenerator (line 473) | public Builder diskCacheFileNameGenerator(FileNameGenerator fileName...
      method discCache (line 483) | @Deprecated
      method diskCache (line 502) | public Builder diskCache(DiskCache diskCache) {
      method imageDownloader (line 520) | public Builder imageDownloader(ImageDownloader imageDownloader) {
      method imageDecoder (line 531) | public Builder imageDecoder(ImageDecoder imageDecoder) {
      method defaultDisplayImageOptions (line 542) | public Builder defaultDisplayImageOptions(DisplayImageOptions defaul...
      method writeDebugLogs (line 552) | public Builder writeDebugLogs() {
      method build (line 558) | public ImageLoaderConfiguration build() {
      method initEmptyFieldsWithDefaultValues (line 563) | private void initEmptyFieldsWithDefaultValues() {
    class NetworkDeniedImageDownloader (line 608) | private static class NetworkDeniedImageDownloader implements ImageDown...
      method NetworkDeniedImageDownloader (line 612) | public NetworkDeniedImageDownloader(ImageDownloader wrappedDownloade...
      method getStream (line 616) | @Override
    class SlowNetworkImageDownloader (line 635) | private static class SlowNetworkImageDownloader implements ImageDownlo...
      method SlowNetworkImageDownloader (line 639) | public SlowNetworkImageDownloader(ImageDownloader wrappedDownloader) {
      method getStream (line 643) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/ImageLoaderEngine.java
  class ImageLoaderEngine (line 42) | class ImageLoaderEngine {
    method ImageLoaderEngine (line 60) | ImageLoaderEngine(ImageLoaderConfiguration configuration) {
    method submit (line 70) | void submit(final LoadAndDisplayImageTask task) {
    method submit (line 88) | void submit(ProcessAndDisplayImageTask task) {
    method isLocalUri (line 93) | private boolean isLocalUri(String uri) {
    method initExecutorsIfNeed (line 98) | private void initExecutorsIfNeed() {
    method createTaskExecutor (line 108) | private Executor createTaskExecutor() {
    method getLoadingUriForView (line 117) | String getLoadingUriForView(ImageAware imageAware) {
    method prepareDisplayTaskFor (line 125) | void prepareDisplayTaskFor(ImageAware imageAware, String memoryCacheKe...
    method cancelDisplayTaskFor (line 135) | void cancelDisplayTaskFor(ImageAware imageAware) {
    method denyNetworkDownloads (line 147) | void denyNetworkDownloads(boolean denyNetworkDownloads) {
    method handleSlowNetwork (line 158) | void handleSlowNetwork(boolean handleSlowNetwork) {
    method pause (line 166) | void pause() {
    method resume (line 171) | void resume() {
    method stop (line 185) | void stop() {
    method fireCallback (line 197) | void fireCallback(Runnable r) {
    method getLockForUri (line 201) | ReentrantLock getLockForUri(String uri) {
    method getPause (line 210) | AtomicBoolean getPause() {
    method getPauseLock (line 214) | Object getPauseLock() {
    method isNetworkDenied (line 218) | boolean isNetworkDenied() {
    method isSlowNetwork (line 222) | boolean isSlowNetwork() {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/ImageLoadingInfo.java
  class ImageLoadingInfo (line 35) | final class ImageLoadingInfo {
    method ImageLoadingInfo (line 46) | public ImageLoadingInfo(String uri, ImageAware imageAware, ImageSize t...

FILE: library/src/main/java/com/nostra13/universalimageloader/core/LoadAndDisplayImageTask.java
  class LoadAndDisplayImageTask (line 51) | final class LoadAndDisplayImageTask implements Runnable, IoUtils.CopyLis...
    method LoadAndDisplayImageTask (line 98) | public LoadAndDisplayImageTask(ImageLoaderEngine engine, ImageLoadingI...
    method run (line 118) | @Override
    method waitIfPaused (line 180) | private boolean waitIfPaused() {
    method delayIfNeed (line 200) | private boolean delayIfNeed() {
    method tryLoadBitmap (line 214) | private Bitmap tryLoadBitmap() throws TaskCancelledException {
    method decodeImage (line 261) | private Bitmap decodeImage(String imageUri) throws IOException {
    method tryCacheImageOnDisk (line 269) | private boolean tryCacheImageOnDisk() throws TaskCancelledException {
    method downloadImage (line 290) | private boolean downloadImage() throws IOException {
    method resizeAndSaveImage (line 305) | private boolean resizeAndSaveImage(int maxWidth, int maxHeight) throws...
    method onBytesCopied (line 332) | @Override
    method fireProgressEvent (line 338) | private boolean fireProgressEvent(final int current, final int total) {
    method fireFailEvent (line 352) | private void fireFailEvent(final FailType failType, final Throwable fa...
    method fireCancelEvent (line 366) | private void fireCancelEvent() {
    method getDownloader (line 377) | private ImageDownloader getDownloader() {
    method checkTaskNotActual (line 394) | private void checkTaskNotActual() throws TaskCancelledException {
    method isTaskNotActual (line 403) | private boolean isTaskNotActual() {
    method checkViewCollected (line 408) | private void checkViewCollected() throws TaskCancelledException {
    method isViewCollected (line 415) | private boolean isViewCollected() {
    method checkViewReused (line 424) | private void checkViewReused() throws TaskCancelledException {
    method isViewReused (line 431) | private boolean isViewReused() {
    method checkTaskInterrupted (line 444) | private void checkTaskInterrupted() throws TaskCancelledException {
    method isTaskInterrupted (line 451) | private boolean isTaskInterrupted() {
    method getLoadingUri (line 459) | String getLoadingUri() {
    method runTask (line 463) | static void runTask(Runnable r, boolean sync, Handler handler, ImageLo...
    class TaskCancelledException (line 480) | class TaskCancelledException extends Exception {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/ProcessAndDisplayImageTask.java
  class ProcessAndDisplayImageTask (line 32) | final class ProcessAndDisplayImageTask implements Runnable {
    method ProcessAndDisplayImageTask (line 41) | public ProcessAndDisplayImageTask(ImageLoaderEngine engine, Bitmap bit...
    method run (line 49) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/assist/ContentLengthInputStream.java
  class ContentLengthInputStream (line 28) | public class ContentLengthInputStream extends InputStream {
    method ContentLengthInputStream (line 33) | public ContentLengthInputStream(InputStream stream, int length) {
    method available (line 38) | @Override
    method close (line 43) | @Override
    method mark (line 48) | @Override
    method read (line 53) | @Override
    method read (line 58) | @Override
    method read (line 63) | @Override
    method reset (line 68) | @Override
    method skip (line 73) | @Override
    method markSupported (line 78) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/assist/FailReason.java
  class FailReason (line 24) | public class FailReason {
    method FailReason (line 30) | public FailReason(FailType type, Throwable cause) {
    method getType (line 36) | public FailType getType() {
    method getCause (line 41) | public Throwable getCause() {
    type FailType (line 46) | public static enum FailType {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/assist/FlushedInputStream.java
  class FlushedInputStream (line 11) | public class FlushedInputStream extends FilterInputStream {
    method FlushedInputStream (line 13) | public FlushedInputStream(InputStream inputStream) {
    method skip (line 17) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/assist/ImageScaleType.java
  type ImageScaleType (line 24) | public enum ImageScaleType {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/assist/ImageSize.java
  class ImageSize (line 24) | public class ImageSize {
    method ImageSize (line 32) | public ImageSize(int width, int height) {
    method ImageSize (line 37) | public ImageSize(int width, int height, int rotation) {
    method getWidth (line 47) | public int getWidth() {
    method getHeight (line 51) | public int getHeight() {
    method scaleDown (line 56) | public ImageSize scaleDown(int sampleSize) {
    method scale (line 61) | public ImageSize scale(float scale) {
    method toString (line 65) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/assist/LoadedFrom.java
  type LoadedFrom (line 8) | public enum LoadedFrom {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/assist/QueueProcessingType.java
  type QueueProcessingType (line 24) | public enum QueueProcessingType {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/assist/ViewScaleType.java
  type ViewScaleType (line 27) | public enum ViewScaleType {
    method fromImageView (line 58) | public static ViewScaleType fromImageView(ImageView imageView) {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/assist/deque/BlockingDeque.java
  type BlockingDeque (line 175) | public interface BlockingDeque<E> extends BlockingQueue<E>, Deque<E> {
    method addFirst (line 196) | void addFirst(E e);
    method addLast (line 211) | void addLast(E e);
    method offerFirst (line 227) | boolean offerFirst(E e);
    method offerLast (line 243) | boolean offerLast(E e);
    method putFirst (line 257) | void putFirst(E e) throws InterruptedException;
    method putLast (line 271) | void putLast(E e) throws InterruptedException;
    method offerFirst (line 292) | boolean offerFirst(E e, long timeout, TimeUnit unit)
    method offerLast (line 314) | boolean offerLast(E e, long timeout, TimeUnit unit)
    method takeFirst (line 324) | E takeFirst() throws InterruptedException;
    method takeLast (line 333) | E takeLast() throws InterruptedException;
    method pollFirst (line 348) | E pollFirst(long timeout, TimeUnit unit)
    method pollLast (line 364) | E pollLast(long timeout, TimeUnit unit)
    method removeFirstOccurrence (line 381) | boolean removeFirstOccurrence(Object o);
    method removeLastOccurrence (line 397) | boolean removeLastOccurrence(Object o);
    method add (line 420) | boolean add(E e);
    method offer (line 440) | boolean offer(E e);
    method put (line 457) | void put(E e) throws InterruptedException;
    method offer (line 477) | boolean offer(E e, long timeout, TimeUnit unit)
    method remove (line 491) | E remove();
    method poll (line 502) | E poll();
    method take (line 514) | E take() throws InterruptedException;
    method poll (line 528) | E poll(long timeout, TimeUnit unit)
    method element (line 542) | E element();
    method peek (line 553) | E peek();
    method remove (line 572) | boolean remove(Object o);
    method contains (line 585) | public boolean contains(Object o);
    method size (line 592) | public int size();
    method iterator (line 600) | Iterator<E> iterator();
    method push (line 616) | void push(E e);

FILE: library/src/main/java/com/nostra13/universalimageloader/core/assist/deque/Deque.java
  type Deque (line 168) | public interface Deque<E> extends Queue<E> {
    method addFirst (line 185) | void addFirst(E e);
    method addLast (line 205) | void addLast(E e);
    method offerFirst (line 223) | boolean offerFirst(E e);
    method offerLast (line 241) | boolean offerLast(E e);
    method removeFirst (line 251) | E removeFirst();
    method removeLast (line 261) | E removeLast();
    method pollFirst (line 269) | E pollFirst();
    method pollLast (line 277) | E pollLast();
    method getFirst (line 288) | E getFirst();
    method getLast (line 298) | E getLast();
    method peekFirst (line 306) | E peekFirst();
    method peekLast (line 314) | E peekLast();
    method removeFirstOccurrence (line 332) | boolean removeFirstOccurrence(Object o);
    method removeLastOccurrence (line 350) | boolean removeLastOccurrence(Object o);
    method add (line 376) | boolean add(E e);
    method offer (line 399) | boolean offer(E e);
    method remove (line 412) | E remove();
    method poll (line 424) | E poll();
    method element (line 437) | E element();
    method peek (line 449) | E peek();
    method push (line 473) | void push(E e);
    method pop (line 485) | E pop();
    method remove (line 508) | boolean remove(Object o);
    method contains (line 523) | boolean contains(Object o);
    method size (line 530) | public int size();
    method iterator (line 538) | Iterator<E> iterator();
    method descendingIterator (line 548) | Iterator<E> descendingIterator();

FILE: library/src/main/java/com/nostra13/universalimageloader/core/assist/deque/LIFOLinkedBlockingDeque.java
  class LIFOLinkedBlockingDeque (line 11) | public class LIFOLinkedBlockingDeque<T> extends LinkedBlockingDeque<T> {
    method offer (line 30) | @Override
    method remove (line 43) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/assist/deque/LinkedBlockingDeque.java
  class LinkedBlockingDeque (line 46) | public class LinkedBlockingDeque<E>
    class Node (line 81) | static final class Node<E> {
      method Node (line 103) | Node(E x) {
    method LinkedBlockingDeque (line 151) | public LinkedBlockingDeque() {
    method LinkedBlockingDeque (line 161) | public LinkedBlockingDeque(int capacity) {
    method LinkedBlockingDeque (line 176) | public LinkedBlockingDeque(Collection<? extends E> c) {
    method linkFirst (line 198) | private boolean linkFirst(Node<E> node) {
    method linkLast (line 217) | private boolean linkLast(Node<E> node) {
    method unlinkFirst (line 236) | private E unlinkFirst() {
    method unlinkLast (line 258) | private E unlinkLast() {
    method unlink (line 280) | void unlink(Node<E> x) {
    method addFirst (line 305) | public void addFirst(E e) {
    method addLast (line 314) | public void addLast(E e) {
    method offerFirst (line 322) | public boolean offerFirst(E e) {
    method offerLast (line 337) | public boolean offerLast(E e) {
    method putFirst (line 353) | public void putFirst(E e) throws InterruptedException {
    method putLast (line 370) | public void putLast(E e) throws InterruptedException {
    method offerFirst (line 387) | public boolean offerFirst(E e, long timeout, TimeUnit unit)
    method offerLast (line 410) | public boolean offerLast(E e, long timeout, TimeUnit unit)
    method removeFirst (line 432) | public E removeFirst() {
    method removeLast (line 441) | public E removeLast() {
    method pollFirst (line 447) | public E pollFirst() {
    method pollLast (line 457) | public E pollLast() {
    method takeFirst (line 467) | public E takeFirst() throws InterruptedException {
    method takeLast (line 480) | public E takeLast() throws InterruptedException {
    method pollFirst (line 493) | public E pollFirst(long timeout, TimeUnit unit)
    method pollLast (line 511) | public E pollLast(long timeout, TimeUnit unit)
    method getFirst (line 532) | public E getFirst() {
    method getLast (line 541) | public E getLast() {
    method peekFirst (line 547) | public E peekFirst() {
    method peekLast (line 557) | public E peekLast() {
    method removeFirstOccurrence (line 567) | public boolean removeFirstOccurrence(Object o) {
    method removeLastOccurrence (line 584) | public boolean removeLastOccurrence(Object o) {
    method add (line 614) | public boolean add(E e) {
    method offer (line 622) | public boolean offer(E e) {
    method put (line 630) | public void put(E e) throws InterruptedException {
    method offer (line 638) | public boolean offer(E e, long timeout, TimeUnit unit)
    method remove (line 653) | public E remove() {
    method poll (line 657) | public E poll() {
    method take (line 661) | public E take() throws InterruptedException {
    method poll (line 665) | public E poll(long timeout, TimeUnit unit) throws InterruptedException {
    method element (line 679) | public E element() {
    method peek (line 683) | public E peek() {
    method remainingCapacity (line 698) | public int remainingCapacity() {
    method drainTo (line 714) | public int drainTo(Collection<? super E> c) {
    method drainTo (line 724) | public int drainTo(Collection<? super E> c, int maxElements) {
    method push (line 749) | public void push(E e) {
    method pop (line 756) | public E pop() {
    method remove (line 776) | public boolean remove(Object o) {
    method size (line 785) | public int size() {
    method contains (line 803) | public boolean contains(Object o) {
    method toArray (line 871) | public Object[] toArray() {
    method toArray (line 921) | @SuppressWarnings("unchecked")
    method toString (line 941) | public String toString() {
    method clear (line 968) | public void clear() {
    method iterator (line 1000) | public Iterator<E> iterator() {
    method descendingIterator (line 1018) | public Iterator<E> descendingIterator() {
    class AbstractItr (line 1025) | private abstract class AbstractItr implements Iterator<E> {
      method firstNode (line 1045) | abstract Node<E> firstNode();
      method nextNode (line 1047) | abstract Node<E> nextNode(Node<E> n);
      method AbstractItr (line 1049) | AbstractItr() {
      method succ (line 1065) | private Node<E> succ(Node<E> n) {
      method advance (line 1084) | void advance() {
      method hasNext (line 1096) | public boolean hasNext() {
      method next (line 1100) | public E next() {
      method remove (line 1109) | public void remove() {
    class Itr (line 1128) | private class Itr extends AbstractItr {
      method firstNode (line 1129) | Node<E> firstNode() {
      method nextNode (line 1133) | Node<E> nextNode(Node<E> n) {
    class DescendingItr (line 1141) | private class DescendingItr extends AbstractItr {
      method firstNode (line 1142) | Node<E> firstNode() {
      method nextNode (line 1146) | Node<E> nextNode(Node<E> n) {
    method writeObject (line 1158) | private void writeObject(java.io.ObjectOutputStream s)
    method readObject (line 1181) | private void readObject(java.io.ObjectInputStream s)

FILE: library/src/main/java/com/nostra13/universalimageloader/core/decode/BaseImageDecoder.java
  class BaseImageDecoder (line 40) | public class BaseImageDecoder implements ImageDecoder {
    method BaseImageDecoder (line 56) | public BaseImageDecoder(boolean loggingEnabled) {
    method decode (line 69) | @Override
    method getImageStream (line 97) | protected InputStream getImageStream(ImageDecodingInfo decodingInfo) t...
    method defineImageSizeAndRotation (line 101) | protected ImageFileInfo defineImageSizeAndRotation(InputStream imageSt...
    method canDefineExifParams (line 117) | private boolean canDefineExifParams(String imageUri, String mimeType) {
    method defineExifOrientation (line 121) | protected ExifInfo defineExifOrientation(String imageUri) {
    method prepareDecodingOptions (line 155) | protected Options prepareDecodingOptions(ImageSize imageSize, ImageDec...
    method resetStream (line 176) | protected InputStream resetStream(InputStream imageStream, ImageDecodi...
    method considerExactScaleAndOrientatiton (line 188) | protected Bitmap considerExactScaleAndOrientatiton(Bitmap subsampledBi...
    class ExifInfo (line 226) | protected static class ExifInfo {
      method ExifInfo (line 231) | protected ExifInfo() {
      method ExifInfo (line 236) | protected ExifInfo(int rotation, boolean flipHorizontal) {
    class ImageFileInfo (line 242) | protected static class ImageFileInfo {
      method ImageFileInfo (line 247) | protected ImageFileInfo(ImageSize imageSize, ExifInfo exif) {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/decode/ImageDecoder.java
  type ImageDecoder (line 29) | public interface ImageDecoder {
    method decode (line 38) | Bitmap decode(ImageDecodingInfo imageDecodingInfo) throws IOException;

FILE: library/src/main/java/com/nostra13/universalimageloader/core/decode/ImageDecodingInfo.java
  class ImageDecodingInfo (line 34) | public class ImageDecodingInfo {
    method ImageDecodingInfo (line 50) | public ImageDecodingInfo(String imageKey, String imageUri, String orig...
    method copyOptions (line 68) | private void copyOptions(Options srcOptions, Options destOptions) {
    method copyOptions10 (line 84) | @TargetApi(10)
    method copyOptions11 (line 89) | @TargetApi(11)
    method getImageKey (line 96) | public String getImageKey() {
    method getImageUri (line 101) | public String getImageUri() {
    method getOriginalImageUri (line 106) | public String getOriginalImageUri() {
    method getTargetSize (line 114) | public ImageSize getTargetSize() {
    method getImageScaleType (line 122) | public ImageScaleType getImageScaleType() {
    method getViewScaleType (line 127) | public ViewScaleType getViewScaleType() {
    method getDownloader (line 132) | public ImageDownloader getDownloader() {
    method getExtraForDownloader (line 137) | public Object getExtraForDownloader() {
    method shouldConsiderExifParams (line 142) | public boolean shouldConsiderExifParams() {
    method getDecodingOptions (line 147) | public Options getDecodingOptions() {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/display/BitmapDisplayer.java
  type BitmapDisplayer (line 32) | public interface BitmapDisplayer {
    method display (line 42) | void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFr...

FILE: library/src/main/java/com/nostra13/universalimageloader/core/display/CircleBitmapDisplayer.java
  class CircleBitmapDisplayer (line 45) | public class CircleBitmapDisplayer implements BitmapDisplayer {
    method CircleBitmapDisplayer (line 50) | public CircleBitmapDisplayer() {
    method CircleBitmapDisplayer (line 54) | public CircleBitmapDisplayer(Integer strokeColor) {
    method CircleBitmapDisplayer (line 58) | public CircleBitmapDisplayer(Integer strokeColor, float strokeWidth) {
    method display (line 63) | @Override
    class CircleDrawable (line 72) | public static class CircleDrawable extends Drawable {
      method CircleDrawable (line 84) | public CircleDrawable(Bitmap bitmap, Integer strokeColor, float stro...
      method onBoundsChange (line 113) | @Override
      method draw (line 126) | @Override
      method getOpacity (line 134) | @Override
      method setAlpha (line 139) | @Override
      method setColorFilter (line 144) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/display/FadeInBitmapDisplayer.java
  class FadeInBitmapDisplayer (line 32) | public class FadeInBitmapDisplayer implements BitmapDisplayer {
    method FadeInBitmapDisplayer (line 43) | public FadeInBitmapDisplayer(int durationMillis) {
    method FadeInBitmapDisplayer (line 53) | public FadeInBitmapDisplayer(int durationMillis, boolean animateFromNe...
    method display (line 61) | @Override
    method animate (line 78) | public static void animate(View imageView, int durationMillis) {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/display/RoundedBitmapDisplayer.java
  class RoundedBitmapDisplayer (line 41) | public class RoundedBitmapDisplayer implements BitmapDisplayer {
    method RoundedBitmapDisplayer (line 46) | public RoundedBitmapDisplayer(int cornerRadiusPixels) {
    method RoundedBitmapDisplayer (line 50) | public RoundedBitmapDisplayer(int cornerRadiusPixels, int marginPixels) {
    method display (line 55) | @Override
    class RoundedDrawable (line 64) | public static class RoundedDrawable extends Drawable {
      method RoundedDrawable (line 74) | public RoundedDrawable(Bitmap bitmap, int cornerRadius, int margin) {
      method onBoundsChange (line 88) | @Override
      method draw (line 100) | @Override
      method getOpacity (line 105) | @Override
      method setAlpha (line 110) | @Override
      method setColorFilter (line 115) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/display/RoundedVignetteBitmapDisplayer.java
  class RoundedVignetteBitmapDisplayer (line 38) | public class RoundedVignetteBitmapDisplayer extends RoundedBitmapDisplay...
    method RoundedVignetteBitmapDisplayer (line 40) | public RoundedVignetteBitmapDisplayer(int cornerRadiusPixels, int marg...
    method display (line 44) | @Override
    class RoundedVignetteDrawable (line 53) | protected static class RoundedVignetteDrawable extends RoundedDrawable {
      method RoundedVignetteDrawable (line 55) | RoundedVignetteDrawable(Bitmap bitmap, int cornerRadius, int margin) {
      method onBoundsChange (line 59) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer.java
  class SimpleBitmapDisplayer (line 28) | public final class SimpleBitmapDisplayer implements BitmapDisplayer {
    method display (line 29) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/download/BaseImageDownloader.java
  class BaseImageDownloader (line 52) | public class BaseImageDownloader implements ImageDownloader {
    method BaseImageDownloader (line 73) | public BaseImageDownloader(Context context) {
    method BaseImageDownloader (line 77) | public BaseImageDownloader(Context context, int connectTimeout, int re...
    method getStream (line 83) | @Override
    method getStreamFromNetwork (line 113) | protected InputStream getStreamFromNetwork(String imageUri, Object ext...
    method shouldBeProcessed (line 144) | protected boolean shouldBeProcessed(HttpURLConnection conn) throws IOE...
    method createConnection (line 158) | protected HttpURLConnection createConnection(String url, Object extra)...
    method getStreamFromFile (line 175) | protected InputStream getStreamFromFile(String imageUri, Object extra)...
    method getVideoThumbnailStream (line 185) | @TargetApi(Build.VERSION_CODES.FROYO)
    method getStreamFromContent (line 208) | protected InputStream getStreamFromContent(String imageUri, Object ext...
    method getContactPhotoStream (line 228) | @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
    method getStreamFromAssets (line 247) | protected InputStream getStreamFromAssets(String imageUri, Object extr...
    method getStreamFromDrawable (line 260) | protected InputStream getStreamFromDrawable(String imageUri, Object ex...
    method getStreamFromOtherSource (line 279) | protected InputStream getStreamFromOtherSource(String imageUri, Object...
    method isVideoContentUri (line 283) | private boolean isVideoContentUri(Uri uri) {
    method isVideoFileUri (line 288) | private boolean isVideoFileUri(String uri) {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/download/ImageDownloader.java
  type ImageDownloader (line 31) | public interface ImageDownloader {
    method getStream (line 42) | InputStream getStream(String imageUri, Object extra) throws IOException;
    type Scheme (line 45) | public enum Scheme {
      method Scheme (line 51) | Scheme(String scheme) {
      method ofUri (line 62) | public static Scheme ofUri(String uri) {
      method belongsTo (line 73) | private boolean belongsTo(String uri) {
      method wrap (line 78) | public String wrap(String path) {
      method crop (line 83) | public String crop(String uri) {

FILE: library/src/main/java/com/nostra13/universalimageloader/core/imageaware/ImageAware.java
  type ImageAware (line 36) | public interface ImageAware {
    method getWidth (line 42) | int getWidth();
    method getHeight (line 49) | int getHeight();
    method getScaleType (line 55) | ViewScaleType getScaleType();
    method getWrappedView (line 62) | View getWrappedView();
    method isCollected (line 74) | boolean isCollected();
    method getId (line 85) | int getId();
    method setImageDrawable (line 102) | boolean setImageDrawable(Drawable drawable);
    method setImageBitmap (line 113) | boolean setImageBitmap(Bitmap bitmap);

FILE: library/src/main/java/com/nostra13/universalimageloader/core/imageaware/ImageViewAware.java
  class ImageViewAware (line 35) | public class ImageViewAware extends ViewAware {
    method ImageViewAware (line 43) | public ImageViewAware(ImageView imageView) {
    method ImageViewAware (line 64) | public ImageViewAware(ImageView imageView, boolean checkActualViewSize) {
    method getWidth (line 73) | @Override
    method getHeight (line 90) | @Override
    method getScaleType (line 102) | @Override
    method getWrappedView (line 111) | @Override
    method setImageDrawableInto (line 116) | @Override
    method setImageBitmapInto (line 124) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/imageaware/NonViewAware.java
  class NonViewAware (line 34) | public class NonViewAware implements ImageAware {
    method NonViewAware (line 40) | public NonViewAware(ImageSize imageSize, ViewScaleType scaleType) {
    method NonViewAware (line 44) | public NonViewAware(String imageUri, ImageSize imageSize, ViewScaleTyp...
    method getWidth (line 53) | @Override
    method getHeight (line 58) | @Override
    method getScaleType (line 63) | @Override
    method getWrappedView (line 68) | @Override
    method isCollected (line 73) | @Override
    method getId (line 78) | @Override
    method setImageDrawable (line 83) | @Override
    method setImageBitmap (line 88) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/imageaware/ViewAware.java
  class ViewAware (line 35) | public abstract class ViewAware implements ImageAware {
    method ViewAware (line 49) | public ViewAware(View view) {
    method ViewAware (line 69) | public ViewAware(View view, boolean checkActualViewSize) {
    method getWidth (line 85) | @Override
    method getHeight (line 109) | @Override
    method getScaleType (line 124) | @Override
    method getWrappedView (line 129) | @Override
    method isCollected (line 134) | @Override
    method getId (line 139) | @Override
    method setImageDrawable (line 145) | @Override
    method setImageBitmap (line 159) | @Override
    method setImageDrawableInto (line 177) | protected abstract void setImageDrawableInto(Drawable drawable, View v...
    method setImageBitmapInto (line 183) | protected abstract void setImageBitmapInto(Bitmap bitmap, View view);

FILE: library/src/main/java/com/nostra13/universalimageloader/core/listener/ImageLoadingListener.java
  type ImageLoadingListener (line 31) | public interface ImageLoadingListener {
    method onLoadingStarted (line 39) | void onLoadingStarted(String imageUri, View view);
    method onLoadingFailed (line 49) | void onLoadingFailed(String imageUri, View view, FailReason failReason);
    method onLoadingComplete (line 58) | void onLoadingComplete(String imageUri, View view, Bitmap loadedImage);
    method onLoadingCancelled (line 66) | void onLoadingCancelled(String imageUri, View view);

FILE: library/src/main/java/com/nostra13/universalimageloader/core/listener/ImageLoadingProgressListener.java
  type ImageLoadingProgressListener (line 26) | public interface ImageLoadingProgressListener {
    method onProgressUpdate (line 36) | void onProgressUpdate(String imageUri, View view, int current, int tot...

FILE: library/src/main/java/com/nostra13/universalimageloader/core/listener/PauseOnScrollListener.java
  class PauseOnScrollListener (line 34) | public class PauseOnScrollListener implements OnScrollListener {
    method PauseOnScrollListener (line 49) | public PauseOnScrollListener(ImageLoader imageLoader, boolean pauseOnS...
    method PauseOnScrollListener (line 62) | public PauseOnScrollListener(ImageLoader imageLoader, boolean pauseOnS...
    method onScrollStateChanged (line 70) | @Override
    method onScroll (line 92) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/listener/SimpleImageLoadingListener.java
  class SimpleImageLoadingListener (line 30) | public class SimpleImageLoadingListener implements ImageLoadingListener {
    method onLoadingStarted (line 31) | @Override
    method onLoadingFailed (line 36) | @Override
    method onLoadingComplete (line 41) | @Override
    method onLoadingCancelled (line 46) | @Override

FILE: library/src/main/java/com/nostra13/universalimageloader/core/process/BitmapProcessor.java
  type BitmapProcessor (line 28) | public interface BitmapProcessor {
    method process (line 39) | Bitmap process(Bitmap bitmap);

FILE: library/src/main/java/com/nostra13/universalimageloader/utils/DiskCacheUtils.java
  class DiskCacheUtils (line 29) | public final class DiskCacheUtils {
    method DiskCacheUtils (line 31) | private DiskCacheUtils() {
    method findInCache (line 35) | public static File findInCache(String imageUri, DiskCache diskCache) {
    method removeFromCache (line 45) | public static boolean removeFromCache(String imageUri, DiskCache diskC...

FILE: library/src/main/java/com/nostra13/universalimageloader/utils/ImageSizeUtils.java
  class ImageSizeUtils (line 33) | public final class ImageSizeUtils {
    method ImageSizeUtils (line 46) | private ImageSizeUtils() {
    method defineTargetSizeForView (line 54) | public static ImageSize defineTargetSizeForView(ImageAware imageAware,...
    method computeImageSampleSize (line 99) | public static int computeImageSampleSize(ImageSize srcSize, ImageSize ...
    method considerMaxTextureSize (line 141) | private static int considerMaxTextureSize(int srcWidth, int srcHeight,...
    method computeMinImageSampleSize (line 163) | public static int computeMinImageSampleSize(ImageSize srcSize) {
    method computeImageScale (line 197) | public static float computeImageScale(ImageSize srcSize, ImageSize tar...

FILE: library/src/main/java/com/nostra13/universalimageloader/utils/IoUtils.java
  class IoUtils (line 29) | public final class IoUtils {
    method IoUtils (line 38) | private IoUtils() {
    method copyStream (line 51) | public static boolean copyStream(InputStream is, OutputStream os, Copy...
    method copyStream (line 66) | public static boolean copyStream(InputStream is, OutputStream os, Copy...
    method shouldStopLoading (line 86) | private static boolean shouldStopLoading(CopyListener listener, int cu...
    method readAndCloseStream (line 103) | public static void readAndCloseStream(InputStream is) {
    method closeSilently (line 113) | public static void closeSilently(Closeable closeable) {
    type CopyListener (line 123) | public static interface CopyListener {
      method onBytesCopied (line 129) | boolean onBytesCopied(int current, int total);

FILE: library/src/main/java/com/nostra13/universalimageloader/utils/L.java
  class L (line 27) | public final class L {
    method L (line 33) | private L() {
    method enableLogging (line 41) | @Deprecated
    method disableLogging (line 51) | @Deprecated
    method writeDebugLogs (line 62) | public static void writeDebugLogs(boolean writeDebugLogs) {
    method writeLogs (line 67) | public static void writeLogs(boolean writeLogs) {
    method d (line 71) | public static void d(String message, Object... args) {
    method i (line 77) | public static void i(String message, Object... args) {
    method w (line 81) | public static void w(String message, Object... args) {
    method e (line 85) | public static void e(Throwable ex) {
    method e (line 89) | public static void e(String message, Object... args) {
    method e (line 93) | public static void e(Throwable ex, String message, Object... args) {
    method log (line 97) | private static void log(int priority, Throwable ex, String message, Ob...

FILE: library/src/main/java/com/nostra13/universalimageloader/utils/MemoryCacheUtils.java
  class MemoryCacheUtils (line 34) | public final class MemoryCacheUtils {
    method MemoryCacheUtils (line 39) | private MemoryCacheUtils() {
    method generateKey (line 46) | public static String generateKey(String imageUri, ImageSize targetSize) {
    method createFuzzyKeyComparator (line 50) | public static Comparator<String> createFuzzyKeyComparator() {
    method findCachedBitmapsForImageUri (line 67) | public static List<Bitmap> findCachedBitmapsForImageUri(String imageUr...
    method findCacheKeysForImageUri (line 83) | public static List<String> findCacheKeysForImageUri(String imageUri, M...
    method removeFromCache (line 99) | public static void removeFromCache(String imageUri, MemoryCache memory...

FILE: library/src/main/java/com/nostra13/universalimageloader/utils/StorageUtils.java
  class StorageUtils (line 33) | public final class StorageUtils {
    method StorageUtils (line 38) | private StorageUtils() {
    method getCacheDirectory (line 51) | public static File getCacheDirectory(Context context) {
    method getCacheDirectory (line 66) | public static File getCacheDirectory(Context context, boolean preferEx...
    method getIndividualCacheDirectory (line 98) | public static File getIndividualCacheDirectory(Context context) {
    method getIndividualCacheDirectory (line 111) | public static File getIndividualCacheDirectory(Context context, String...
    method getOwnCacheDirectory (line 130) | public static File getOwnCacheDirectory(Context context, String cacheD...
    method getOwnCacheDirectory (line 149) | public static File getOwnCacheDirectory(Context context, String cacheD...
    method getExternalCacheDir (line 160) | private static File getExternalCacheDir(Context context) {
    method hasExternalStoragePermission (line 177) | private static boolean hasExternalStoragePermission(Context context) {

FILE: library/src/test/java/com/nostra13/universalimageloader/core/assist/ImageSizeTest.java
  class ImageSizeTest (line 20) | @RunWith(RobolectricTestRunner.class)
    method setUp (line 26) | @Before
    method testGetImageSizeScaleTo_useImageActualSize (line 38) | @Test
    method testGetImageSizeScaleTo_dontUseImageActualSizeWithWrapContent (line 57) | @Test
    method testGetImageSizeScaleTo_useImageLayoutParams (line 70) | @Test
    method testGetImageSizeScaleTo_useImageConfigMaxSize (line 80) | @Test
    method testComputeImageSampleSize_fitInside (line 87) | @Test
    method testComputeImageSampleSize_centerCrop (line 128) | @Test
    class TestImageView (line 170) | private class TestImageView extends ImageView {
      method TestImageView (line 171) | TestImageView(Context activity) {
      method onLayout (line 175) | @Override

FILE: library/src/test/java/com/nostra13/universalimageloader/core/download/BaseImageDownloaderTest.java
  class BaseImageDownloaderTest (line 10) | @RunWith(RobolectricTestRunner.class)
    method testSchemeHttp (line 13) | @Test
    method testSchemeHttps (line 21) | @Test
    method testSchemeContent (line 29) | @Test
    method testSchemeAssets (line 37) | @Test
    method testSchemeDrawables (line 45) | @Test
    method testSchemeFile (line 53) | @Test
    method testSchemeUnknown (line 61) | @Test

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/Constants.java
  class Constants (line 21) | public final class Constants {
    method Constants (line 164) | private Constants() {
    class Config (line 167) | public static class Config {
    class Extra (line 171) | public static class Extra {

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/UILApplication.java
  class UILApplication (line 31) | public class UILApplication extends Application {
    method onCreate (line 32) | @TargetApi(Build.VERSION_CODES.GINGERBREAD)
    method initImageLoader (line 46) | public static void initImageLoader(Context context) {

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/activity/ComplexImageActivity.java
  class ComplexImageActivity (line 31) | public class ComplexImageActivity extends FragmentActivity {
    method onCreate (line 37) | @Override
    method onSaveInstanceState (line 49) | @Override
    class ImagePagerAdapter (line 54) | private class ImagePagerAdapter extends FragmentPagerAdapter {
      method ImagePagerAdapter (line 59) | ImagePagerAdapter(FragmentManager fm) {
      method getCount (line 65) | @Override
      method getItem (line 70) | @Override
      method getPageTitle (line 82) | @Override

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/activity/HomeActivity.java
  class HomeActivity (line 41) | public class HomeActivity extends Activity {
    method onCreate (line 45) | @Override
    method onImageListClick (line 56) | public void onImageListClick(View view) {
    method onImageGridClick (line 62) | public void onImageGridClick(View view) {
    method onImagePagerClick (line 68) | public void onImagePagerClick(View view) {
    method onImageGalleryClick (line 74) | public void onImageGalleryClick(View view) {
    method onFragmentsClick (line 80) | public void onFragmentsClick(View view) {
    method onBackPressed (line 85) | @Override
    method onCreateOptionsMenu (line 91) | @Override
    method onOptionsItemSelected (line 97) | @Override
    method copyTestImageToSdCard (line 111) | private void copyTestImageToSdCard(final File testImageOnSdCard) {

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/activity/SimpleImageActivity.java
  class SimpleImageActivity (line 31) | public class SimpleImageActivity extends FragmentActivity {
    method onCreate (line 32) | @Override

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/ext/Base64ImageDownloader.java
  class Base64ImageDownloader (line 35) | @TargetApi(Build.VERSION_CODES.FROYO)
    method Base64ImageDownloader (line 43) | public Base64ImageDownloader(Context context) {
    method Base64ImageDownloader (line 47) | public Base64ImageDownloader(Context context, int connectTimeout, int ...
    method getStreamFromOtherSource (line 51) | @Override
    method getStreamFormBase64 (line 59) | protected InputStream getStreamFormBase64(String imageUri, Object extr...

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/ext/BrokenJpegImageDecoder.java
  class BrokenJpegImageDecoder (line 12) | public class BrokenJpegImageDecoder extends BaseImageDecoder {
    method BrokenJpegImageDecoder (line 14) | public BrokenJpegImageDecoder(boolean loggingEnabled) {
    method getImageStream (line 18) | @Override
    class JpegClosedInputStream (line 25) | private class JpegClosedInputStream extends InputStream {
      method JpegClosedInputStream (line 33) | private JpegClosedInputStream(InputStream inputStream) {
      method read (line 38) | @Override

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/ext/HttpClientImageDownloader.java
  class HttpClientImageDownloader (line 34) | public class HttpClientImageDownloader extends BaseImageDownloader {
    method HttpClientImageDownloader (line 38) | public HttpClientImageDownloader(Context context, HttpClient httpClien...
    method getStreamFromNetwork (line 43) | @Override

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/ext/OkHttpImageDownloader.java
  class OkHttpImageDownloader (line 35) | public class OkHttpImageDownloader extends BaseImageDownloader {
    method OkHttpImageDownloader (line 39) | public OkHttpImageDownloader(Context context, OkHttpClient client) {
    method getStreamFromNetwork (line 44) | @Override

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/ext/OldRoundedBitmapDisplayer.java
  class OldRoundedBitmapDisplayer (line 42) | public class OldRoundedBitmapDisplayer implements BitmapDisplayer {
    method OldRoundedBitmapDisplayer (line 46) | public OldRoundedBitmapDisplayer(int roundPixels) {
    method display (line 50) | @Override
    method roundCorners (line 70) | public static Bitmap roundCorners(Bitmap bitmap, ImageViewAware imageA...
    method getRoundedCornerBitmap (line 178) | private static Bitmap getRoundedCornerBitmap(Bitmap bitmap, int roundP...

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/AbsListViewBaseFragment.java
  class AbsListViewBaseFragment (line 31) | public abstract class AbsListViewBaseFragment extends BaseFragment {
    method onResume (line 41) | @Override
    method onPrepareOptionsMenu (line 47) | @Override
    method onOptionsItemSelected (line 58) | @Override
    method startImagePagerActivity (line 76) | protected void startImagePagerActivity(int position) {
    method applyScrollListener (line 83) | private void applyScrollListener() {

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/BaseFragment.java
  class BaseFragment (line 29) | public abstract class BaseFragment extends Fragment {
    method onCreate (line 30) | @Override
    method onCreateOptionsMenu (line 37) | public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    method onOptionsItemSelected (line 41) | @Override

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/ImageGalleryFragment.java
  class ImageGalleryFragment (line 41) | public class ImageGalleryFragment extends BaseFragment {
    method onCreateView (line 45) | @SuppressWarnings("deprecation")
    method startImagePagerActivity (line 61) | private void startImagePagerActivity(int position) {
    class ImageAdapter (line 68) | private static class ImageAdapter extends BaseAdapter {
      method ImageAdapter (line 76) | ImageAdapter(Context context) {
      method getCount (line 91) | @Override
      method getItem (line 96) | @Override
      method getItemId (line 101) | @Override
      method getView (line 106) | @Override

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/ImageGridFragment.java
  class ImageGridFragment (line 41) | public class ImageGridFragment extends AbsListViewBaseFragment {
    method onCreateView (line 45) | @Override
    class ImageAdapter (line 59) | private static class ImageAdapter extends BaseAdapter {
      method ImageAdapter (line 67) | ImageAdapter(Context context) {
      method getCount (line 81) | @Override
      method getItem (line 86) | @Override
      method getItemId (line 91) | @Override
      method getView (line 96) | @Override
    class ViewHolder (line 139) | static class ViewHolder {

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/ImageListFragment.java
  class ImageListFragment (line 48) | public class ImageListFragment extends AbsListViewBaseFragment {
    method onCreateView (line 52) | @Override
    method onDestroy (line 66) | @Override
    class ImageAdapter (line 72) | private static class ImageAdapter extends BaseAdapter {
      method ImageAdapter (line 81) | ImageAdapter(Context context) {
      method getCount (line 95) | @Override
      method getItem (line 100) | @Override
      method getItemId (line 105) | @Override
      method getView (line 110) | @Override
    class ViewHolder (line 132) | static class ViewHolder {
    class AnimateFirstDisplayListener (line 137) | private static class AnimateFirstDisplayListener extends SimpleImageLo...
      method onLoadingComplete (line 141) | @Override

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/ImagePagerFragment.java
  class ImagePagerFragment (line 42) | public class ImagePagerFragment extends BaseFragment {
    method onCreateView (line 46) | @Override
    class ImageAdapter (line 55) | private static class ImageAdapter extends PagerAdapter {
      method ImageAdapter (line 62) | ImageAdapter(Context context) {
      method destroyItem (line 77) | @Override
      method getCount (line 82) | @Override
      method instantiateItem (line 87) | @Override
      method isViewFromObject (line 135) | @Override
      method restoreState (line 140) | @Override
      method saveState (line 144) | @Override

FILE: sample/src/main/java/com/nostra13/universalimageloader/sample/widget/UILWidgetProvider.java
  class UILWidgetProvider (line 38) | public class UILWidgetProvider extends AppWidgetProvider {
    method onUpdate (line 46) | @Override
    method updateAppWidget (line 57) | static void updateAppWidget(Context context, final AppWidgetManager ap...
Condensed preview — 129 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (629K chars).
[
  {
    "path": ".github/workflows/gradle-wrapper-validation.yml",
    "chars": 223,
    "preview": "name: \"Validate Gradle Wrapper\"\non: [push, pull_request]\n\njobs:\n  validation:\n    name: \"Validation\"\n    runs-on: ubuntu"
  },
  {
    "path": ".gitignore",
    "chars": 292,
    "preview": "# Android generated\nbin/\ngen/\n\n# Ant\nbuild.xml\nlocal.properties\n\n# Maven\ntarget/\npom.xml.*\nrelease.properties\n\n# Eclipse"
  },
  {
    "path": ".travis.yml",
    "chars": 140,
    "preview": "sudo: false\nlanguage: android\nandroid:\n  components:\n    - platform-tools\n    - tools\n    - build-tools-28.0.3\n    - and"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 17145,
    "preview": "Change Log\n===\n\nv1.9.5 *(27.11.2015)*\n---\n * **New API:**\n   * `ImageLoader.displayImage(..., ImageSize targetImageSize,"
  },
  {
    "path": "LICENSE",
    "chars": 11356,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "README.md",
    "chars": 11628,
    "preview": "# ![Logo](https://github.com/nostra13/Android-Universal-Image-Loader/raw/master/sample/src/main/res/drawable-mdpi/ic_lau"
  },
  {
    "path": "build.gradle",
    "chars": 519,
    "preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    r"
  },
  {
    "path": "gradle/maven_push.gradle",
    "chars": 4153,
    "preview": "/*\n * Copyright 2013 Chris Banes\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not us"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "chars": 232,
    "preview": "#Tue Apr 23 15:38:19 MSK 2019\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
  },
  {
    "path": "gradle.properties",
    "chars": 727,
    "preview": "org.gradle.daemon=true\n\nVERSION_NAME=1.9.5\nVERSION_COE=40\nGROUP=com.nostra13.universalimageloader\n\nPOM_DESCRIPTION=Power"
  },
  {
    "path": "gradlew",
    "chars": 5080,
    "preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start "
  },
  {
    "path": "gradlew.bat",
    "chars": 2314,
    "preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
  },
  {
    "path": "library/build.gradle",
    "chars": 1107,
    "preview": "apply plugin: 'com.android.library'\n\nandroid {\n    compileSdkVersion 28\n    buildToolsVersion \"28.0.3\"\n\n    defaultConfi"
  },
  {
    "path": "library/gradle.properties",
    "chars": 97,
    "preview": "POM_NAME=Universal Image Loader Library\nPOM_ARTIFACT_ID=universal-image-loader\nPOM_PACKAGING=jar\n"
  },
  {
    "path": "library/project.properties",
    "chars": 382,
    "preview": "# This file is automatically generated by Android Tools.\n# Do not modify this file -- YOUR CHANGES WILL BE ERASED!\n#\n# T"
  },
  {
    "path": "library/src/main/AndroidManifest.xml",
    "chars": 164,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n          pa"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/disc/DiskCache.java",
    "chars": 2897,
    "preview": "/*******************************************************************************\n * Copyright 2014 Sergey Tarasevich\n *\n"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/BaseDiskCache.java",
    "chars": 5982,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/LimitedAgeDiskCache.java",
    "chars": 4407,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/UnlimitedDiskCache.java",
    "chars": 2140,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/ext/DiskLruCache.java",
    "chars": 29975,
    "preview": "/*\n * Copyright (C) 2011 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/ext/LruDiskCache.java",
    "chars": 7673,
    "preview": "/*******************************************************************************\n * Copyright 2014 Sergey Tarasevich\n *\n"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/ext/StrictLineReader.java",
    "chars": 6789,
    "preview": "/*\n * Copyright (C) 2012 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/ext/Util.java",
    "chars": 2117,
    "preview": "/*\n * Copyright (C) 2010 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/disc/naming/FileNameGenerator.java",
    "chars": 1082,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/disc/naming/HashCodeFileNameGenerator.java",
    "chars": 1152,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/disc/naming/Md5FileNameGenerator.java",
    "chars": 1742,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/memory/BaseMemoryCache.java",
    "chars": 2170,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/memory/LimitedMemoryCache.java",
    "chars": 3560,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/memory/MemoryCache.java",
    "chars": 1518,
    "preview": "/*******************************************************************************\n * Copyright 2014 Sergey Tarasevich\n *\n"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/FIFOLimitedMemoryCache.java",
    "chars": 2533,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/FuzzyKeyMemoryCache.java",
    "chars": 2419,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/LRULimitedMemoryCache.java",
    "chars": 3217,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/LargestLimitedMemoryCache.java",
    "chars": 3406,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/LimitedAgeMemoryCache.java",
    "chars": 2648,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/LruMemoryCache.java",
    "chars": 3777,
    "preview": "package com.nostra13.universalimageloader.cache.memory.impl;\n\nimport android.graphics.Bitmap;\n\nimport com.nostra13.unive"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/UsingFreqLimitedMemoryCache.java",
    "chars": 3826,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/cache/memory/impl/WeakMemoryCache.java",
    "chars": 1453,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/DefaultConfigurationFactory.java",
    "chars": 7772,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/DisplayBitmapTask.java",
    "chars": 3493,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/DisplayImageOptions.java",
    "chars": 17571,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/ImageLoader.java",
    "chars": 42028,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/ImageLoaderConfiguration.java",
    "chars": 25673,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/ImageLoaderEngine.java",
    "chars": 7580,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/ImageLoadingInfo.java",
    "chars": 2314,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/LoadAndDisplayImageTask.java",
    "chars": 17692,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/ProcessAndDisplayImageTask.java",
    "chars": 2367,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/assist/ContentLengthInputStream.java",
    "chars": 2153,
    "preview": "/*******************************************************************************\n * Copyright 2013-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/assist/FailReason.java",
    "chars": 2160,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/assist/FlushedInputStream.java",
    "chars": 857,
    "preview": "package com.nostra13.universalimageloader.core.assist;\n\nimport java.io.FilterInputStream;\nimport java.io.IOException;\nim"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/assist/ImageScaleType.java",
    "chars": 4117,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/assist/ImageSize.java",
    "chars": 2057,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/assist/LoadedFrom.java",
    "chars": 217,
    "preview": "package com.nostra13.universalimageloader.core.assist;\n\n/**\n * Source image loaded from.\n *\n * @author Sergey Tarasevich"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/assist/QueueProcessingType.java",
    "chars": 1018,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/assist/ViewScaleType.java",
    "chars": 2476,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/assist/deque/BlockingDeque.java",
    "chars": 25827,
    "preview": "/*\n * Written by Doug Lea with assistance from members of JCP JSR-166\n * Expert Group and released to the public domain,"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/assist/deque/Deque.java",
    "chars": 23008,
    "preview": "/*\n * Written by Doug Lea and Josh Bloch with assistance from members of\n * JCP JSR-166 Expert Group and released to the"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/assist/deque/LIFOLinkedBlockingDeque.java",
    "chars": 1528,
    "preview": "package com.nostra13.universalimageloader.core.assist.deque;\n\nimport java.util.NoSuchElementException;\n\n/**\n * {@link Li"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/assist/deque/LinkedBlockingDeque.java",
    "chars": 36125,
    "preview": "/*\n * Written by Doug Lea with assistance from members of JCP JSR-166\n * Expert Group and released to the public domain,"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/decode/BaseImageDecoder.java",
    "chars": 9302,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/decode/ImageDecoder.java",
    "chars": 1299,
    "preview": "/*******************************************************************************\n * Copyright 2013 Sergey Tarasevich\n *\n"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/decode/ImageDecodingInfo.java",
    "chars": 5412,
    "preview": "/*******************************************************************************\n * Copyright 2013-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/display/BitmapDisplayer.java",
    "chars": 2008,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/display/CircleBitmapDisplayer.java",
    "chars": 4831,
    "preview": "/*******************************************************************************\n * Copyright 2015 Sergey Tarasevich\n *\n"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/display/FadeInBitmapDisplayer.java",
    "chars": 3317,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/display/RoundedBitmapDisplayer.java",
    "chars": 4056,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/display/RoundedVignetteBitmapDisplayer.java",
    "chars": 2952,
    "preview": "/*******************************************************************************\n * Copyright 2013 Sergey Tarasevich\n *\n"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer.java",
    "chars": 1376,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/download/BaseImageDownloader.java",
    "chars": 12311,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/download/ImageDownloader.java",
    "chars": 3020,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/imageaware/ImageAware.java",
    "chars": 5533,
    "preview": "/*******************************************************************************\n * Copyright 2013-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/imageaware/ImageViewAware.java",
    "chars": 4258,
    "preview": "/*******************************************************************************\n * Copyright 2013-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/imageaware/NonViewAware.java",
    "chars": 2800,
    "preview": "/*******************************************************************************\n * Copyright 2013-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/imageaware/ViewAware.java",
    "chars": 6347,
    "preview": "/*******************************************************************************\n * Copyright 2014 Sergey Tarasevich\n *\n"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/listener/ImageLoadingListener.java",
    "chars": 2493,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/listener/ImageLoadingProgressListener.java",
    "chars": 1325,
    "preview": "/*******************************************************************************\n * Copyright 2013 Sergey Tarasevich\n *\n"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/listener/PauseOnScrollListener.java",
    "chars": 3816,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/listener/SimpleImageLoadingListener.java",
    "chars": 1791,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/core/process/BitmapProcessor.java",
    "chars": 1719,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/utils/DiskCacheUtils.java",
    "chars": 1855,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/utils/ImageSizeUtils.java",
    "chars": 9292,
    "preview": "/*******************************************************************************\n * Copyright 2013-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/utils/IoUtils.java",
    "chars": 4393,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/utils/L.java",
    "chars": 3345,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/utils/MemoryCacheUtils.java",
    "chars": 4322,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/main/java/com/nostra13/universalimageloader/utils/StorageUtils.java",
    "chars": 7522,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "library/src/test/java/com/nostra13/universalimageloader/core/assist/ImageSizeTest.java",
    "chars": 7814,
    "preview": "package com.nostra13.universalimageloader.core.assist;\n\nimport android.app.Activity;\nimport android.content.Context;\nimp"
  },
  {
    "path": "library/src/test/java/com/nostra13/universalimageloader/core/download/BaseImageDownloaderTest.java",
    "chars": 1966,
    "preview": "package com.nostra13.universalimageloader.core.download;\n\nimport org.assertj.core.api.Assertions;\nimport org.junit.Test;"
  },
  {
    "path": "sample/build.gradle",
    "chars": 1327,
    "preview": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 28\n    buildToolsVersion \"28.0.3\"\n\n    defaultC"
  },
  {
    "path": "sample/gradle.properties",
    "chars": 103,
    "preview": "POM_NAME=Universal Image Loader Sample\nPOM_ARTIFACT_ID=universal-image-loader-sample\nPOM_PACKAGING=apk\n"
  },
  {
    "path": "sample/project.properties",
    "chars": 361,
    "preview": "# This file is automatically generated by Android Tools.\n# Do not modify this file -- YOUR CHANGES WILL BE ERASED!\n#\n# T"
  },
  {
    "path": "sample/src/main/AndroidManifest.xml",
    "chars": 1486,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package="
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/Constants.java",
    "chars": 16412,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/UILApplication.java",
    "chars": 2640,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/activity/ComplexImageActivity.java",
    "chars": 2774,
    "preview": "/*******************************************************************************\n * Copyright 2014 Sergey Tarasevich\n *\n"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/activity/HomeActivity.java",
    "chars": 4302,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/activity/SimpleImageActivity.java",
    "chars": 2970,
    "preview": "/*******************************************************************************\n * Copyright 2014 Sergey Tarasevich\n *\n"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/ext/Base64ImageDownloader.java",
    "chars": 2354,
    "preview": "/*******************************************************************************\n * Copyright 2015 Sergey Tarasevich\n *\n"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/ext/BrokenJpegImageDecoder.java",
    "chars": 1386,
    "preview": "package com.nostra13.universalimageloader.sample.ext;\n\nimport com.nostra13.universalimageloader.core.decode.BaseImageDec"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/ext/HttpClientImageDownloader.java",
    "chars": 1954,
    "preview": "/*******************************************************************************\n * Copyright 2011-2015 Sergey Tarasevic"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/ext/OkHttpImageDownloader.java",
    "chars": 2059,
    "preview": "/*******************************************************************************\n * Copyright 2011-2015 Sergey Tarasevic"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/ext/OldRoundedBitmapDisplayer.java",
    "chars": 6636,
    "preview": "/*******************************************************************************\n * Copyright 2011-2015 Sergey Tarasevic"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/AbsListViewBaseFragment.java",
    "chars": 3050,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/BaseFragment.java",
    "chars": 1794,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/ImageGalleryFragment.java",
    "chars": 3902,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/ImageGridFragment.java",
    "chars": 4749,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/ImageListFragment.java",
    "chars": 4961,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/ImagePagerFragment.java",
    "chars": 4938,
    "preview": "/*******************************************************************************\n * Copyright 2011-2014 Sergey Tarasevic"
  },
  {
    "path": "sample/src/main/java/com/nostra13/universalimageloader/sample/widget/UILWidgetProvider.java",
    "chars": 3108,
    "preview": "/*******************************************************************************\n * Copyright 2011-2013 Sergey Tarasevic"
  },
  {
    "path": "sample/src/main/res/layout/ac_complex.xml",
    "chars": 512,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.v4.view.ViewPager xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "sample/src/main/res/layout/ac_home.xml",
    "chars": 1850,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:l"
  },
  {
    "path": "sample/src/main/res/layout/fr_image_gallery.xml",
    "chars": 278,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Gallery xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id=\""
  },
  {
    "path": "sample/src/main/res/layout/fr_image_grid.xml",
    "chars": 385,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<GridView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id="
  },
  {
    "path": "sample/src/main/res/layout/fr_image_list.xml",
    "chars": 217,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ListView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id="
  },
  {
    "path": "sample/src/main/res/layout/fr_image_pager.xml",
    "chars": 236,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.v4.view.ViewPager xmlns:android=\"http://schemas.android.com/apk/"
  },
  {
    "path": "sample/src/main/res/layout/item_gallery_image.xml",
    "chars": 348,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ImageView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id"
  },
  {
    "path": "sample/src/main/res/layout/item_grid_image.xml",
    "chars": 670,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:"
  },
  {
    "path": "sample/src/main/res/layout/item_list_image.xml",
    "chars": 685,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid"
  },
  {
    "path": "sample/src/main/res/layout/item_pager_image.xml",
    "chars": 649,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:"
  },
  {
    "path": "sample/src/main/res/layout/widget.xml",
    "chars": 963,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid"
  },
  {
    "path": "sample/src/main/res/menu/main_menu.xml",
    "chars": 719,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <item\n   "
  },
  {
    "path": "sample/src/main/res/values/strings.xml",
    "chars": 1254,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n\t<!-- Activity titles -->\n\t<string name=\"app_name\">Universal Image L"
  },
  {
    "path": "sample/src/main/res/values/styles.xml",
    "chars": 156,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <style name=\"ProgressBarStyle\" parent=\"@android:style/Widget.Pro"
  },
  {
    "path": "sample/src/main/res/values-v11/styles.xml",
    "chars": 161,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <style name=\"ProgressBarStyle\" parent=\"@android:style/Widget.Hol"
  },
  {
    "path": "sample/src/main/res/xml/widget_provider.xml",
    "chars": 265,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<appwidget-provider xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  "
  },
  {
    "path": "settings.gradle",
    "chars": 30,
    "preview": "include ':library', ':sample'\n"
  }
]

// ... and 4 more files (download for full content)

About this extraction

This page contains the full source code of the nostra13/Android-Universal-Image-Loader GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 129 files (569.5 KB), approximately 145.2k tokens, and a symbol index with 919 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!