Java Code Examples for com.danikula.videocache.ProxyCacheUtils

The following examples show how to use com.danikula.videocache.ProxyCacheUtils. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: TigerVideo   Source File: Config.java    License: Apache License 2.0 5 votes vote down vote up
private HttpProxyCacheServer buildCacheProxy() {

            return new HttpProxyCacheServer
                    .Builder(context.getApplicationContext())
                    .cacheDirectory(new File(Utils.getCacheDir(context)))
                    .fileNameGenerator(new Md5FileNameGenerator() {
                        @Override
                        public String generate(String url) {

                            return ProxyCacheUtils.computeMD5(url);
                        }
                    })
                    .maxCacheFilesCount(20)
                    .build();
        }
 
Example 2
Source Project: AndriodVideoCache   Source File: Md5FileNameGenerator.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public String generate(String url) {
    String extension = getExtension(url);
    String name = ProxyCacheUtils.computeMD5(url);
    return TextUtils.isEmpty(extension) ? name : name + "." + extension;
}
 
Example 3
Source Project: DKVideoPlayer   Source File: Md5FileNameGenerator.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public String generate(String url) {
    String extension = getExtension(url);
    String name = ProxyCacheUtils.computeMD5(url);
    return TextUtils.isEmpty(extension) ? name : name + "." + extension;
}
 
Example 4
Source Project: GSYVideoPlayer   Source File: Md5FileNameGenerator.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public String generate(String url) {
    String extension = getExtension(url);
    String name = ProxyCacheUtils.computeMD5(url);
    return TextUtils.isEmpty(extension) ? name : name + "." + extension;
}
 
Example 5
Source Project: AndroidVideoCache   Source File: Md5FileNameGenerator.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public String generate(String url) {
    String extension = getExtension(url);
    String name = ProxyCacheUtils.computeMD5(url);
    return TextUtils.isEmpty(extension) ? name : name + "." + extension;
}